<!DOCTYPE html>
<html lang="en">
<head profile="http://a9.com/-/spec/opensearch/1.1/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../assets/site.css" rel="stylesheet">
  <title>go/ast</title>
  
    <meta name="twitter:title" content="Package ast">
    <meta property="og:title" content="Package ast">
    <meta name="description" content="Package ast declares the types used to represent syntax trees for Go packages.">
    <meta name="twitter:description" content="Package ast declares the types used to represent syntax trees for Go packages.">
    <meta property="og:description" content="Package ast declares the types used to represent syntax trees for Go packages.">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@golang">
  
  

  

</head>
<body>

<div class="container">
  
        <h2 id="pkg-overview">package ast</h2>

        <p><code>import "go/ast"</code>

        <p>
Package ast declares the types used to represent syntax trees for Go
packages.</p>


        
  


        
        <h3 id="pkg-index" class="section-header">Index <a class="permalink" href="#pkg-index">&para;</a></h3>

        

        <ul class="list-unstyled">
          
          
          <li><a href="#FileExports">func FileExports(src *File) bool</a></li><li><a href="#FilterDecl">func FilterDecl(decl Decl, f Filter) bool</a></li><li><a href="#FilterFile">func FilterFile(src *File, f Filter) bool</a></li><li><a href="#FilterPackage">func FilterPackage(pkg *Package, f Filter) bool</a></li><li><a href="#Fprint">func Fprint(w io.Writer, fset *token.FileSet, x interface{}, f FieldFilter) error</a></li><li><a href="#Inspect">func Inspect(node Node, f func(Node) bool)</a></li><li><a href="#IsExported">func IsExported(name string) bool</a></li><li><a href="#NotNilFilter">func NotNilFilter(_ string, v reflect.Value) bool</a></li><li><a href="#PackageExports">func PackageExports(pkg *Package) bool</a></li><li><a href="#Print">func Print(fset *token.FileSet, x interface{}) error</a></li><li><a href="#SortImports">func SortImports(fset *token.FileSet, f *File)</a></li><li><a href="#Walk">func Walk(v Visitor, node Node)</a></li>
          
            <li><a href="#ArrayType">type ArrayType</a></li>
            <ul>
            
            <li><a href="#ArrayType.End">func (x *ArrayType) End() token.Pos</a></li><li><a href="#ArrayType.Pos">func (x *ArrayType) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#AssignStmt">type AssignStmt</a></li>
            <ul>
            
            <li><a href="#AssignStmt.End">func (s *AssignStmt) End() token.Pos</a></li><li><a href="#AssignStmt.Pos">func (s *AssignStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BadDecl">type BadDecl</a></li>
            <ul>
            
            <li><a href="#BadDecl.End">func (d *BadDecl) End() token.Pos</a></li><li><a href="#BadDecl.Pos">func (d *BadDecl) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BadExpr">type BadExpr</a></li>
            <ul>
            
            <li><a href="#BadExpr.End">func (x *BadExpr) End() token.Pos</a></li><li><a href="#BadExpr.Pos">func (x *BadExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BadStmt">type BadStmt</a></li>
            <ul>
            
            <li><a href="#BadStmt.End">func (s *BadStmt) End() token.Pos</a></li><li><a href="#BadStmt.Pos">func (s *BadStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BasicLit">type BasicLit</a></li>
            <ul>
            
            <li><a href="#BasicLit.End">func (x *BasicLit) End() token.Pos</a></li><li><a href="#BasicLit.Pos">func (x *BasicLit) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BinaryExpr">type BinaryExpr</a></li>
            <ul>
            
            <li><a href="#BinaryExpr.End">func (x *BinaryExpr) End() token.Pos</a></li><li><a href="#BinaryExpr.Pos">func (x *BinaryExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BlockStmt">type BlockStmt</a></li>
            <ul>
            
            <li><a href="#BlockStmt.End">func (s *BlockStmt) End() token.Pos</a></li><li><a href="#BlockStmt.Pos">func (s *BlockStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#BranchStmt">type BranchStmt</a></li>
            <ul>
            
            <li><a href="#BranchStmt.End">func (s *BranchStmt) End() token.Pos</a></li><li><a href="#BranchStmt.Pos">func (s *BranchStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#CallExpr">type CallExpr</a></li>
            <ul>
            
            <li><a href="#CallExpr.End">func (x *CallExpr) End() token.Pos</a></li><li><a href="#CallExpr.Pos">func (x *CallExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#CaseClause">type CaseClause</a></li>
            <ul>
            
            <li><a href="#CaseClause.End">func (s *CaseClause) End() token.Pos</a></li><li><a href="#CaseClause.Pos">func (s *CaseClause) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#ChanDir">type ChanDir</a></li>
            
            
            
            
          
            <li><a href="#ChanType">type ChanType</a></li>
            <ul>
            
            <li><a href="#ChanType.End">func (x *ChanType) End() token.Pos</a></li><li><a href="#ChanType.Pos">func (x *ChanType) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#CommClause">type CommClause</a></li>
            <ul>
            
            <li><a href="#CommClause.End">func (s *CommClause) End() token.Pos</a></li><li><a href="#CommClause.Pos">func (s *CommClause) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Comment">type Comment</a></li>
            <ul>
            
            <li><a href="#Comment.End">func (c *Comment) End() token.Pos</a></li><li><a href="#Comment.Pos">func (c *Comment) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#CommentGroup">type CommentGroup</a></li>
            <ul>
            
            <li><a href="#CommentGroup.End">func (g *CommentGroup) End() token.Pos</a></li><li><a href="#CommentGroup.Pos">func (g *CommentGroup) Pos() token.Pos</a></li><li><a href="#CommentGroup.Text">func (g *CommentGroup) Text() string</a></li>
            </ul>
          
            <li><a href="#CommentMap">type CommentMap</a></li>
            <ul>
            <li><a href="#NewCommentMap">func NewCommentMap(fset *token.FileSet, node Node, comments []*CommentGroup) CommentMap</a></li>
            <li><a href="#CommentMap.Comments">func (cmap CommentMap) Comments() []*CommentGroup</a></li><li><a href="#CommentMap.Filter">func (cmap CommentMap) Filter(node Node) CommentMap</a></li><li><a href="#CommentMap.String">func (cmap CommentMap) String() string</a></li><li><a href="#CommentMap.Update">func (cmap CommentMap) Update(old, new Node) Node</a></li>
            </ul>
          
            <li><a href="#CompositeLit">type CompositeLit</a></li>
            <ul>
            
            <li><a href="#CompositeLit.End">func (x *CompositeLit) End() token.Pos</a></li><li><a href="#CompositeLit.Pos">func (x *CompositeLit) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Decl">type Decl</a></li>
            
            
            
            
          
            <li><a href="#DeclStmt">type DeclStmt</a></li>
            <ul>
            
            <li><a href="#DeclStmt.End">func (s *DeclStmt) End() token.Pos</a></li><li><a href="#DeclStmt.Pos">func (s *DeclStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#DeferStmt">type DeferStmt</a></li>
            <ul>
            
            <li><a href="#DeferStmt.End">func (s *DeferStmt) End() token.Pos</a></li><li><a href="#DeferStmt.Pos">func (s *DeferStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Ellipsis">type Ellipsis</a></li>
            <ul>
            
            <li><a href="#Ellipsis.End">func (x *Ellipsis) End() token.Pos</a></li><li><a href="#Ellipsis.Pos">func (x *Ellipsis) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#EmptyStmt">type EmptyStmt</a></li>
            <ul>
            
            <li><a href="#EmptyStmt.End">func (s *EmptyStmt) End() token.Pos</a></li><li><a href="#EmptyStmt.Pos">func (s *EmptyStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Expr">type Expr</a></li>
            
            
            
            
          
            <li><a href="#ExprStmt">type ExprStmt</a></li>
            <ul>
            
            <li><a href="#ExprStmt.End">func (s *ExprStmt) End() token.Pos</a></li><li><a href="#ExprStmt.Pos">func (s *ExprStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Field">type Field</a></li>
            <ul>
            
            <li><a href="#Field.End">func (f *Field) End() token.Pos</a></li><li><a href="#Field.Pos">func (f *Field) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#FieldFilter">type FieldFilter</a></li>
            
            
            
            
          
            <li><a href="#FieldList">type FieldList</a></li>
            <ul>
            
            <li><a href="#FieldList.End">func (f *FieldList) End() token.Pos</a></li><li><a href="#FieldList.NumFields">func (f *FieldList) NumFields() int</a></li><li><a href="#FieldList.Pos">func (f *FieldList) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#File">type File</a></li>
            <ul>
            <li><a href="#MergePackageFiles">func MergePackageFiles(pkg *Package, mode MergeMode) *File</a></li>
            <li><a href="#File.End">func (f *File) End() token.Pos</a></li><li><a href="#File.Pos">func (f *File) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Filter">type Filter</a></li>
            
            
            
            
          
            <li><a href="#ForStmt">type ForStmt</a></li>
            <ul>
            
            <li><a href="#ForStmt.End">func (s *ForStmt) End() token.Pos</a></li><li><a href="#ForStmt.Pos">func (s *ForStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#FuncDecl">type FuncDecl</a></li>
            <ul>
            
            <li><a href="#FuncDecl.End">func (d *FuncDecl) End() token.Pos</a></li><li><a href="#FuncDecl.Pos">func (d *FuncDecl) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#FuncLit">type FuncLit</a></li>
            <ul>
            
            <li><a href="#FuncLit.End">func (x *FuncLit) End() token.Pos</a></li><li><a href="#FuncLit.Pos">func (x *FuncLit) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#FuncType">type FuncType</a></li>
            <ul>
            
            <li><a href="#FuncType.End">func (x *FuncType) End() token.Pos</a></li><li><a href="#FuncType.Pos">func (x *FuncType) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#GenDecl">type GenDecl</a></li>
            <ul>
            
            <li><a href="#GenDecl.End">func (d *GenDecl) End() token.Pos</a></li><li><a href="#GenDecl.Pos">func (d *GenDecl) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#GoStmt">type GoStmt</a></li>
            <ul>
            
            <li><a href="#GoStmt.End">func (s *GoStmt) End() token.Pos</a></li><li><a href="#GoStmt.Pos">func (s *GoStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Ident">type Ident</a></li>
            <ul>
            <li><a href="#NewIdent">func NewIdent(name string) *Ident</a></li>
            <li><a href="#Ident.End">func (x *Ident) End() token.Pos</a></li><li><a href="#Ident.IsExported">func (id *Ident) IsExported() bool</a></li><li><a href="#Ident.Pos">func (x *Ident) Pos() token.Pos</a></li><li><a href="#Ident.String">func (id *Ident) String() string</a></li>
            </ul>
          
            <li><a href="#IfStmt">type IfStmt</a></li>
            <ul>
            
            <li><a href="#IfStmt.End">func (s *IfStmt) End() token.Pos</a></li><li><a href="#IfStmt.Pos">func (s *IfStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#ImportSpec">type ImportSpec</a></li>
            <ul>
            
            <li><a href="#ImportSpec.End">func (s *ImportSpec) End() token.Pos</a></li><li><a href="#ImportSpec.Pos">func (s *ImportSpec) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Importer">type Importer</a></li>
            
            
            
            
          
            <li><a href="#IncDecStmt">type IncDecStmt</a></li>
            <ul>
            
            <li><a href="#IncDecStmt.End">func (s *IncDecStmt) End() token.Pos</a></li><li><a href="#IncDecStmt.Pos">func (s *IncDecStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#IndexExpr">type IndexExpr</a></li>
            <ul>
            
            <li><a href="#IndexExpr.End">func (x *IndexExpr) End() token.Pos</a></li><li><a href="#IndexExpr.Pos">func (x *IndexExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#InterfaceType">type InterfaceType</a></li>
            <ul>
            
            <li><a href="#InterfaceType.End">func (x *InterfaceType) End() token.Pos</a></li><li><a href="#InterfaceType.Pos">func (x *InterfaceType) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#KeyValueExpr">type KeyValueExpr</a></li>
            <ul>
            
            <li><a href="#KeyValueExpr.End">func (x *KeyValueExpr) End() token.Pos</a></li><li><a href="#KeyValueExpr.Pos">func (x *KeyValueExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#LabeledStmt">type LabeledStmt</a></li>
            <ul>
            
            <li><a href="#LabeledStmt.End">func (s *LabeledStmt) End() token.Pos</a></li><li><a href="#LabeledStmt.Pos">func (s *LabeledStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#MapType">type MapType</a></li>
            <ul>
            
            <li><a href="#MapType.End">func (x *MapType) End() token.Pos</a></li><li><a href="#MapType.Pos">func (x *MapType) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#MergeMode">type MergeMode</a></li>
            
            
            
            
          
            <li><a href="#Node">type Node</a></li>
            
            
            
            
          
            <li><a href="#ObjKind">type ObjKind</a></li>
            <ul>
            
            <li><a href="#ObjKind.String">func (kind ObjKind) String() string</a></li>
            </ul>
          
            <li><a href="#Object">type Object</a></li>
            <ul>
            <li><a href="#NewObj">func NewObj(kind ObjKind, name string) *Object</a></li>
            <li><a href="#Object.Pos">func (obj *Object) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Package">type Package</a></li>
            <ul>
            <li><a href="#NewPackage">func NewPackage(fset *token.FileSet, files map[string]*File, importer Importer, universe *Scope) (*Package, error)</a></li>
            <li><a href="#Package.End">func (p *Package) End() token.Pos</a></li><li><a href="#Package.Pos">func (p *Package) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#ParenExpr">type ParenExpr</a></li>
            <ul>
            
            <li><a href="#ParenExpr.End">func (x *ParenExpr) End() token.Pos</a></li><li><a href="#ParenExpr.Pos">func (x *ParenExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#RangeStmt">type RangeStmt</a></li>
            <ul>
            
            <li><a href="#RangeStmt.End">func (s *RangeStmt) End() token.Pos</a></li><li><a href="#RangeStmt.Pos">func (s *RangeStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#ReturnStmt">type ReturnStmt</a></li>
            <ul>
            
            <li><a href="#ReturnStmt.End">func (s *ReturnStmt) End() token.Pos</a></li><li><a href="#ReturnStmt.Pos">func (s *ReturnStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Scope">type Scope</a></li>
            <ul>
            <li><a href="#NewScope">func NewScope(outer *Scope) *Scope</a></li>
            <li><a href="#Scope.Insert">func (s *Scope) Insert(obj *Object) (alt *Object)</a></li><li><a href="#Scope.Lookup">func (s *Scope) Lookup(name string) *Object</a></li><li><a href="#Scope.String">func (s *Scope) String() string</a></li>
            </ul>
          
            <li><a href="#SelectStmt">type SelectStmt</a></li>
            <ul>
            
            <li><a href="#SelectStmt.End">func (s *SelectStmt) End() token.Pos</a></li><li><a href="#SelectStmt.Pos">func (s *SelectStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#SelectorExpr">type SelectorExpr</a></li>
            <ul>
            
            <li><a href="#SelectorExpr.End">func (x *SelectorExpr) End() token.Pos</a></li><li><a href="#SelectorExpr.Pos">func (x *SelectorExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#SendStmt">type SendStmt</a></li>
            <ul>
            
            <li><a href="#SendStmt.End">func (s *SendStmt) End() token.Pos</a></li><li><a href="#SendStmt.Pos">func (s *SendStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#SliceExpr">type SliceExpr</a></li>
            <ul>
            
            <li><a href="#SliceExpr.End">func (x *SliceExpr) End() token.Pos</a></li><li><a href="#SliceExpr.Pos">func (x *SliceExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Spec">type Spec</a></li>
            
            
            
            
          
            <li><a href="#StarExpr">type StarExpr</a></li>
            <ul>
            
            <li><a href="#StarExpr.End">func (x *StarExpr) End() token.Pos</a></li><li><a href="#StarExpr.Pos">func (x *StarExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Stmt">type Stmt</a></li>
            
            
            
            
          
            <li><a href="#StructType">type StructType</a></li>
            <ul>
            
            <li><a href="#StructType.End">func (x *StructType) End() token.Pos</a></li><li><a href="#StructType.Pos">func (x *StructType) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#SwitchStmt">type SwitchStmt</a></li>
            <ul>
            
            <li><a href="#SwitchStmt.End">func (s *SwitchStmt) End() token.Pos</a></li><li><a href="#SwitchStmt.Pos">func (s *SwitchStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#TypeAssertExpr">type TypeAssertExpr</a></li>
            <ul>
            
            <li><a href="#TypeAssertExpr.End">func (x *TypeAssertExpr) End() token.Pos</a></li><li><a href="#TypeAssertExpr.Pos">func (x *TypeAssertExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#TypeSpec">type TypeSpec</a></li>
            <ul>
            
            <li><a href="#TypeSpec.End">func (s *TypeSpec) End() token.Pos</a></li><li><a href="#TypeSpec.Pos">func (s *TypeSpec) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#TypeSwitchStmt">type TypeSwitchStmt</a></li>
            <ul>
            
            <li><a href="#TypeSwitchStmt.End">func (s *TypeSwitchStmt) End() token.Pos</a></li><li><a href="#TypeSwitchStmt.Pos">func (s *TypeSwitchStmt) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#UnaryExpr">type UnaryExpr</a></li>
            <ul>
            
            <li><a href="#UnaryExpr.End">func (x *UnaryExpr) End() token.Pos</a></li><li><a href="#UnaryExpr.Pos">func (x *UnaryExpr) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#ValueSpec">type ValueSpec</a></li>
            <ul>
            
            <li><a href="#ValueSpec.End">func (s *ValueSpec) End() token.Pos</a></li><li><a href="#ValueSpec.Pos">func (s *ValueSpec) Pos() token.Pos</a></li>
            </ul>
          
            <li><a href="#Visitor">type Visitor</a></li>
            
            
            
            
          
          
        </ul>

        
        
          <h4 id="pkg-examples">Examples <a class="permalink" href="#pkg-examples">&para;</a></h4>
          <ul class="list-unstyled">
            <li><a href="#example-CommentMap" onclick="$('#ex-CommentMap').addClass('in').removeClass('collapse').height('auto')">CommentMap</a></li><li><a href="#example-Inspect" onclick="$('#ex-Inspect').addClass('in').removeClass('collapse').height('auto')">Inspect</a></li><li><a href="#example-Print" onclick="$('#ex-Print').addClass('in').removeClass('collapse').height('auto')">Print</a></li>
          </ul>
        

        
        
<h4 id="pkg-files">
  <a href="https://github.com/golang/go/blob/master/src/go/ast/">Package Files</a>
  <a class="permalink" href="#pkg-files">&para;</a>
</h4>

<p><a href="https://github.com/golang/go/blob/master/src/go/ast/ast.go">ast.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go">commentmap.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/filter.go">filter.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/import.go">import.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/print.go">print.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/resolve.go">resolve.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/scope.go">scope.go</a> <a href="https://github.com/golang/go/blob/master/src/go/ast/walk.go">walk.go</a> </p>

        
        

        
        

        
        
        
          <h3 id="FileExports" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L28">FileExports</a> <a class="permalink" href="#FileExports">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=FileExports&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L28">❖</a><pre>func FileExports(src *<a href="#File">File</a>) <a href="/builtin#bool">bool</a></pre></div><p>
FileExports trims the AST for a Go source file in place such that
only exported nodes remain: all top-level identifiers which are not exported
and their associated information (such as type, initial value, or function
body) are removed. Non-exported fields and methods of exported types are
stripped. The File.Comments list is not changed.
</p>
<p>
FileExports reports whether there are exported declarations.
</p>

          
  

        
          <h3 id="FilterDecl" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L204">FilterDecl</a> <a class="permalink" href="#FilterDecl">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=FilterDecl&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L204">❖</a><pre>func FilterDecl(decl <a href="#Decl">Decl</a>, f <a href="#Filter">Filter</a>) <a href="/builtin#bool">bool</a></pre></div><p>
FilterDecl trims the AST for a Go declaration in place by removing
all names (including struct field and interface method names, but
not from parameter lists) that don&#39;t pass through the filter f.
</p>
<p>
FilterDecl reports whether there are any declared names left after
filtering.
</p>

          
  

        
          <h3 id="FilterFile" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L229">FilterFile</a> <a class="permalink" href="#FilterFile">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=FilterFile&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L229">❖</a><pre>func FilterFile(src *<a href="#File">File</a>, f <a href="#Filter">Filter</a>) <a href="/builtin#bool">bool</a></pre></div><p>
FilterFile trims the AST for a Go file in place by removing all
names from top-level declarations (including struct field and
interface method names, but not from parameter lists) that don&#39;t
pass through the filter f. If the declaration is empty afterwards,
the declaration is removed from the AST. Import declarations are
always removed. The File.Comments list is not changed.
</p>
<p>
FilterFile reports whether there are any top-level declarations
left after filtering.
</p>

          
  

        
          <h3 id="FilterPackage" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L256">FilterPackage</a> <a class="permalink" href="#FilterPackage">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=FilterPackage&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L256">❖</a><pre>func FilterPackage(pkg *<a href="#Package">Package</a>, f <a href="#Filter">Filter</a>) <a href="/builtin#bool">bool</a></pre></div><p>
FilterPackage trims the AST for a Go package in place by removing
all names from top-level declarations (including struct field and
interface method names, but not from parameter lists) that don&#39;t
pass through the filter f. If the declaration is empty afterwards,
the declaration is removed from the AST. The pkg.Files list is not
changed, so that file names and top-level package comments don&#39;t get
lost.
</p>
<p>
FilterPackage reports whether there are any top-level declarations
left after filtering.
</p>

          
  

        
          <h3 id="Fprint" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L39">Fprint</a> <a class="permalink" href="#Fprint">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Fprint&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L39">❖</a><pre>func Fprint(w <a href="/io">io</a>.<a href="/io#Writer">Writer</a>, fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, x interface{}, f <a href="#FieldFilter">FieldFilter</a>) <a href="/builtin#error">error</a></pre></div><p>
Fprint prints the (sub-)tree starting at AST node x to w.
If fset != nil, position information is interpreted relative
to that file set. Otherwise positions are printed as integer
values (file set specific offsets).
</p>
<p>
A non-nil FieldFilter f may be provided to control the output:
struct fields for which f(fieldname, fieldvalue) is true are
printed; all others are filtered from the output. Unexported
struct fields are never printed.
</p>

          
  

        
          <h3 id="Inspect" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/walk.go#L384">Inspect</a> <a class="permalink" href="#Inspect">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Inspect&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/walk.go#L384">❖</a><pre>func Inspect(node <a href="#Node">Node</a>, f func(<a href="#Node">Node</a>) <a href="/builtin#bool">bool</a>)</pre></div><p>
Inspect traverses an AST in depth-first order: It starts by calling
f(node); node must not be nil. If f returns true, Inspect invokes f
recursively for each of the non-nil children of node, followed by a
call of f(nil).
</p>

          
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-Inspect">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-Inspect">Example</a></div>
        <div id="ex-Inspect" class="panel-collapse collapse"><div class="panel-body">
          <p><p>
This example demonstrates how to inspect the AST of a Go program.
</p>

          <p>Code:<span class="pull-right"><a href="?play=Inspect">play</a>&nbsp;</span>
          <pre><span class="com">// src is the input for which we want to inspect the AST.</span>
src := `
package p
const c = 1.0
var X = f(3.14)*2 + c
`

<span class="com">// Create the AST by parsing src.</span>
fset := token.NewFileSet() <span class="com">// positions are relative to fset</span>
f, err := parser.ParseFile(fset, &#34;src.go&#34;, src, 0)
if err != nil {
    panic(err)
}

<span class="com">// Inspect the AST and print all identifiers and literals.</span>
ast.Inspect(f, func(n ast.Node) bool {
    var s string
    switch x := n.(type) {
    case *ast.BasicLit:
        s = x.Value
    case *ast.Ident:
        s = x.Name
    }
    if s != &#34;&#34; {
        fmt.Printf(&#34;%s:\t%s\n&#34;, fset.Position(n.Pos()), s)
    }
    return true
})</pre>
          <p>Output:<pre>src.go:2:9:	p
src.go:3:7:	c
src.go:3:11:	1.0
src.go:4:5:	X
src.go:4:9:	f
src.go:4:11:	3.14
src.go:4:17:	2
src.go:4:21:	c
</pre>
        </div></div>
      </div>
    
    </div>
  

        
          <h3 id="IsExported" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L526">IsExported</a> <a class="permalink" href="#IsExported">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=IsExported&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L526">❖</a><pre>func IsExported(name <a href="/builtin#string">string</a>) <a href="/builtin#bool">bool</a></pre></div><p>
IsExported reports whether name is an exported Go symbol
(that is, whether it begins with an upper-case letter).
</p>

          
  

        
          <h3 id="NotNilFilter" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L22">NotNilFilter</a> <a class="permalink" href="#NotNilFilter">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NotNilFilter&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L22">❖</a><pre>func NotNilFilter(_ <a href="/builtin#string">string</a>, v <a href="/reflect">reflect</a>.<a href="/reflect#Value">Value</a>) <a href="/builtin#bool">bool</a></pre></div><p>
NotNilFilter returns true for field values that are not nil;
it returns false otherwise.
</p>

          
  

        
          <h3 id="PackageExports" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L39">PackageExports</a> <a class="permalink" href="#PackageExports">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=PackageExports&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L39">❖</a><pre>func PackageExports(pkg *<a href="#Package">Package</a>) <a href="/builtin#bool">bool</a></pre></div><p>
PackageExports trims the AST for a Go package in place such that
only exported nodes remain. The pkg.Files list is not changed, so that
file names and top-level package comments don&#39;t get lost.
</p>
<p>
PackageExports reports whether there are exported declarations;
it returns false otherwise.
</p>

          
  

        
          <h3 id="Print" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L73">Print</a> <a class="permalink" href="#Print">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Print&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L73">❖</a><pre>func Print(fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, x interface{}) <a href="/builtin#error">error</a></pre></div><p>
Print prints x to standard output, skipping nil fields.
Print(fset, x) is the same as Fprint(os.Stdout, fset, x, NotNilFilter).
</p>

          
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-Print">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-Print">Example</a></div>
        <div id="ex-Print" class="panel-collapse collapse"><div class="panel-body">
          <p><p>
This example shows what an AST looks like when printed for debugging.
</p>

          <p>Code:<span class="pull-right"><a href="?play=Print">play</a>&nbsp;</span>
          <pre><span class="com">// src is the input for which we want to print the AST.</span>
src := `
package main
func main() {
	println(&#34;Hello, World!&#34;)
}
`

<span class="com">// Create the AST by parsing src.</span>
fset := token.NewFileSet() <span class="com">// positions are relative to fset</span>
f, err := parser.ParseFile(fset, &#34;&#34;, src, 0)
if err != nil {
    panic(err)
}

<span class="com">// Print the AST.</span>
ast.Print(fset, f)</pre>
          <p>Output:<pre>     0  *ast.File {
     1  .  Package: 2:1
     2  .  Name: *ast.Ident {
     3  .  .  NamePos: 2:9
     4  .  .  Name: &#34;main&#34;
     5  .  }
     6  .  Decls: []ast.Decl (len = 1) {
     7  .  .  0: *ast.FuncDecl {
     8  .  .  .  Name: *ast.Ident {
     9  .  .  .  .  NamePos: 3:6
    10  .  .  .  .  Name: &#34;main&#34;
    11  .  .  .  .  Obj: *ast.Object {
    12  .  .  .  .  .  Kind: func
    13  .  .  .  .  .  Name: &#34;main&#34;
    14  .  .  .  .  .  Decl: *(obj @ 7)
    15  .  .  .  .  }
    16  .  .  .  }
    17  .  .  .  Type: *ast.FuncType {
    18  .  .  .  .  Func: 3:1
    19  .  .  .  .  Params: *ast.FieldList {
    20  .  .  .  .  .  Opening: 3:10
    21  .  .  .  .  .  Closing: 3:11
    22  .  .  .  .  }
    23  .  .  .  }
    24  .  .  .  Body: *ast.BlockStmt {
    25  .  .  .  .  Lbrace: 3:13
    26  .  .  .  .  List: []ast.Stmt (len = 1) {
    27  .  .  .  .  .  0: *ast.ExprStmt {
    28  .  .  .  .  .  .  X: *ast.CallExpr {
    29  .  .  .  .  .  .  .  Fun: *ast.Ident {
    30  .  .  .  .  .  .  .  .  NamePos: 4:2
    31  .  .  .  .  .  .  .  .  Name: &#34;println&#34;
    32  .  .  .  .  .  .  .  }
    33  .  .  .  .  .  .  .  Lparen: 4:9
    34  .  .  .  .  .  .  .  Args: []ast.Expr (len = 1) {
    35  .  .  .  .  .  .  .  .  0: *ast.BasicLit {
    36  .  .  .  .  .  .  .  .  .  ValuePos: 4:10
    37  .  .  .  .  .  .  .  .  .  Kind: STRING
    38  .  .  .  .  .  .  .  .  .  Value: &#34;\&#34;Hello, World!\&#34;&#34;
    39  .  .  .  .  .  .  .  .  }
    40  .  .  .  .  .  .  .  }
    41  .  .  .  .  .  .  .  Ellipsis: -
    42  .  .  .  .  .  .  .  Rparen: 4:25
    43  .  .  .  .  .  .  }
    44  .  .  .  .  .  }
    45  .  .  .  .  }
    46  .  .  .  .  Rbrace: 5:1
    47  .  .  .  }
    48  .  .  }
    49  .  }
    50  .  Scope: *ast.Scope {
    51  .  .  Objects: map[string]*ast.Object (len = 1) {
    52  .  .  .  &#34;main&#34;: *(obj @ 11)
    53  .  .  }
    54  .  }
    55  .  Unresolved: []*ast.Ident (len = 1) {
    56  .  .  0: *(obj @ 29)
    57  .  }
    58  }
</pre>
        </div></div>
      </div>
    
    </div>
  

        
          <h3 id="SortImports" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/import.go#L15">SortImports</a> <a class="permalink" href="#SortImports">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=SortImports&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/import.go#L15">❖</a><pre>func SortImports(fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, f *<a href="#File">File</a>)</pre></div><p>
SortImports sorts runs of consecutive import lines in import blocks in f.
It also removes duplicate imports when it is possible to do so without data loss.
</p>

          
  

        
          <h3 id="Walk" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/walk.go#L51">Walk</a> <a class="permalink" href="#Walk">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=Walk&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/walk.go#L51">❖</a><pre>func Walk(v <a href="#Visitor">Visitor</a>, node <a href="#Node">Node</a>)</pre></div><p>
Walk traverses an AST in depth-first order: It starts by calling
v.Visit(node); node must not be nil. If the visitor w returned by
v.Visit(node) is not nil, Walk is invoked recursively with visitor
w for each of the non-nil children of node, followed by a call of
w.Visit(nil).
</p>

          
  

        

        
        

        
          <h3 id="ArrayType" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L375">ArrayType</a> <a class="permalink" href="#ArrayType">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ArrayType&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L375">❖</a><pre>type ArrayType struct {
    <span id="ArrayType.Lbrack">Lbrack</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;[&#34;</span>
    <span id="ArrayType.Len">Len</span>    <a href="#Expr">Expr</a>      <span class="com">// Ellipsis node for [...]T array types, nil for slice types</span>
    <span id="ArrayType.Elt">Elt</span>    <a href="#Expr">Expr</a>      <span class="com">// element type</span>
}</pre></div><p>
An ArrayType node represents an array or slice type.
</p>

          
          
          
  


          

          
            <h4 id="ArrayType.End" data-kind="m">func (*ArrayType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L476">End</a> <a class="permalink" href="#ArrayType.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ArrayType%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L476">❖</a><pre>func (x *<a href="#ArrayType">ArrayType</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ArrayType.Pos" data-kind="m">func (*ArrayType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L443">Pos</a> <a class="permalink" href="#ArrayType.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ArrayType%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L443">❖</a><pre>func (x *<a href="#ArrayType">ArrayType</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="AssignStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L603">AssignStmt</a> <a class="permalink" href="#AssignStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=AssignStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L603">❖</a><pre>type AssignStmt struct {
    <span id="AssignStmt.Lhs">Lhs</span>    []<a href="#Expr">Expr</a>
    <span id="AssignStmt.TokPos">TokPos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of Tok</span>
    <span id="AssignStmt.Tok">Tok</span>    <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// assignment token, DEFINE</span>
    <span id="AssignStmt.Rhs">Rhs</span>    []<a href="#Expr">Expr</a>
}</pre></div><p>
An AssignStmt node represents an assignment or
a short variable declaration.
</p>

          
          
          
  


          

          
            <h4 id="AssignStmt.End" data-kind="m">func (*AssignStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L749">End</a> <a class="permalink" href="#AssignStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=AssignStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L749">❖</a><pre>func (s *<a href="#AssignStmt">AssignStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="AssignStmt.Pos" data-kind="m">func (*AssignStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L720">Pos</a> <a class="permalink" href="#AssignStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=AssignStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L720">❖</a><pre>func (s *<a href="#AssignStmt">AssignStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BadDecl" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L899">BadDecl</a> <a class="permalink" href="#BadDecl">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BadDecl&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L899">❖</a><pre>type BadDecl struct {
    <span id="BadDecl.From">From</span>, <span id="BadDecl.To">To</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position range of bad declaration</span>
}</pre></div><p>
A BadDecl node is a placeholder for declarations containing
syntax errors for which no correct declaration nodes can be
created.
</p>

          
          
          
  


          

          
            <h4 id="BadDecl.End" data-kind="m">func (*BadDecl) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L939">End</a> <a class="permalink" href="#BadDecl.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BadDecl%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L939">❖</a><pre>func (d *<a href="#BadDecl">BadDecl</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BadDecl.Pos" data-kind="m">func (*BadDecl) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L935">Pos</a> <a class="permalink" href="#BadDecl.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BadDecl%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L935">❖</a><pre>func (d *<a href="#BadDecl">BadDecl</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BadExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L233">BadExpr</a> <a class="permalink" href="#BadExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BadExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L233">❖</a><pre>type BadExpr struct {
    <span id="BadExpr.From">From</span>, <span id="BadExpr.To">To</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position range of bad expression</span>
}</pre></div><p>
A BadExpr node is a placeholder for expressions containing
syntax errors for which no correct expression nodes can be
created.
</p>

          
          
          
  


          

          
            <h4 id="BadExpr.End" data-kind="m">func (*BadExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L455">End</a> <a class="permalink" href="#BadExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BadExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L455">❖</a><pre>func (x *<a href="#BadExpr">BadExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BadExpr.Pos" data-kind="m">func (*BadExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L422">Pos</a> <a class="permalink" href="#BadExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BadExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L422">❖</a><pre>func (x *<a href="#BadExpr">BadExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BadStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L554">BadStmt</a> <a class="permalink" href="#BadStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BadStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L554">❖</a><pre>type BadStmt struct {
    <span id="BadStmt.From">From</span>, <span id="BadStmt.To">To</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position range of bad statement</span>
}</pre></div><p>
A BadStmt node is a placeholder for statements containing
syntax errors for which no correct statement nodes can be
created.
</p>

          
          
          
  


          

          
            <h4 id="BadStmt.End" data-kind="m">func (*BadStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L735">End</a> <a class="permalink" href="#BadStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BadStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L735">❖</a><pre>func (s *<a href="#BadStmt">BadStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BadStmt.Pos" data-kind="m">func (*BadStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L713">Pos</a> <a class="permalink" href="#BadStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BadStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L713">❖</a><pre>func (s *<a href="#BadStmt">BadStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BasicLit" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L253">BasicLit</a> <a class="permalink" href="#BasicLit">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BasicLit&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L253">❖</a><pre>type BasicLit struct {
    <span id="BasicLit.ValuePos">ValuePos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// literal position</span>
    <span id="BasicLit.Kind">Kind</span>     <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// token.INT, token.FLOAT, token.IMAG, token.CHAR, or token.STRING</span>
    <span id="BasicLit.Value">Value</span>    <a href="/builtin#string">string</a>      <span class="com">// literal string; e.g. 42, 0x7f, 3.14, 1e-9, 2.4i, &#39;a&#39;, &#39;\x7f&#39;, &#34;foo&#34; or `\m\n\o`</span>
}</pre></div><p>
A BasicLit node represents a literal of basic type.
</p>

          
          
          
  


          

          
            <h4 id="BasicLit.End" data-kind="m">func (*BasicLit) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L463">End</a> <a class="permalink" href="#BasicLit.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BasicLit%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L463">❖</a><pre>func (x *<a href="#BasicLit">BasicLit</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BasicLit.Pos" data-kind="m">func (*BasicLit) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L425">Pos</a> <a class="permalink" href="#BasicLit.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BasicLit%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L425">❖</a><pre>func (x *<a href="#BasicLit">BasicLit</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BinaryExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L342">BinaryExpr</a> <a class="permalink" href="#BinaryExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BinaryExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L342">❖</a><pre>type BinaryExpr struct {
    <span id="BinaryExpr.X">X</span>     <a href="#Expr">Expr</a>        <span class="com">// left operand</span>
    <span id="BinaryExpr.OpPos">OpPos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of Op</span>
    <span id="BinaryExpr.Op">Op</span>    <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// operator</span>
    <span id="BinaryExpr.Y">Y</span>     <a href="#Expr">Expr</a>        <span class="com">// right operand</span>
}</pre></div><p>
A BinaryExpr node represents a binary expression.
</p>

          
          
          
  


          

          
            <h4 id="BinaryExpr.End" data-kind="m">func (*BinaryExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L474">End</a> <a class="permalink" href="#BinaryExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BinaryExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L474">❖</a><pre>func (x *<a href="#BinaryExpr">BinaryExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BinaryExpr.Pos" data-kind="m">func (*BinaryExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L441">Pos</a> <a class="permalink" href="#BinaryExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BinaryExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L441">❖</a><pre>func (x *<a href="#BinaryExpr">BinaryExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BlockStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L638">BlockStmt</a> <a class="permalink" href="#BlockStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BlockStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L638">❖</a><pre>type BlockStmt struct {
    <span id="BlockStmt.Lbrace">Lbrace</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;{&#34;</span>
    <span id="BlockStmt.List">List</span>   []<a href="#Stmt">Stmt</a>
    <span id="BlockStmt.Rbrace">Rbrace</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;}&#34;</span>
}</pre></div><p>
A BlockStmt node represents a braced statement list.
</p>

          
          
          
  


          

          
            <h4 id="BlockStmt.End" data-kind="m">func (*BlockStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L764">End</a> <a class="permalink" href="#BlockStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BlockStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L764">❖</a><pre>func (s *<a href="#BlockStmt">BlockStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BlockStmt.Pos" data-kind="m">func (*BlockStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L725">Pos</a> <a class="permalink" href="#BlockStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BlockStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L725">❖</a><pre>func (s *<a href="#BlockStmt">BlockStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="BranchStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L631">BranchStmt</a> <a class="permalink" href="#BranchStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=BranchStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L631">❖</a><pre>type BranchStmt struct {
    <span id="BranchStmt.TokPos">TokPos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of Tok</span>
    <span id="BranchStmt.Tok">Tok</span>    <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// keyword token (BREAK, CONTINUE, GOTO, FALLTHROUGH)</span>
    <span id="BranchStmt.Label">Label</span>  *<a href="#Ident">Ident</a>      <span class="com">// label name; or nil</span>
}</pre></div><p>
A BranchStmt node represents a break, continue, goto,
or fallthrough statement.
</p>

          
          
          
  


          

          
            <h4 id="BranchStmt.End" data-kind="m">func (*BranchStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L758">End</a> <a class="permalink" href="#BranchStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BranchStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L758">❖</a><pre>func (s *<a href="#BranchStmt">BranchStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="BranchStmt.Pos" data-kind="m">func (*BranchStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L724">Pos</a> <a class="permalink" href="#BranchStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=BranchStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L724">❖</a><pre>func (s *<a href="#BranchStmt">BranchStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="CallExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L316">CallExpr</a> <a class="permalink" href="#CallExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=CallExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L316">❖</a><pre>type CallExpr struct {
    <span id="CallExpr.Fun">Fun</span>      <a href="#Expr">Expr</a>      <span class="com">// function expression</span>
    <span id="CallExpr.Lparen">Lparen</span>   <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;(&#34;</span>
    <span id="CallExpr.Args">Args</span>     []<a href="#Expr">Expr</a>    <span class="com">// function arguments; or nil</span>
    <span id="CallExpr.Ellipsis">Ellipsis</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;...&#34; (token.NoPos if there is no &#34;...&#34;)</span>
    <span id="CallExpr.Rparen">Rparen</span>   <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;)&#34;</span>
}</pre></div><p>
A CallExpr node represents an expression followed by an argument list.
</p>

          
          
          
  


          

          
            <h4 id="CallExpr.End" data-kind="m">func (*CallExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L471">End</a> <a class="permalink" href="#CallExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CallExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L471">❖</a><pre>func (x *<a href="#CallExpr">CallExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="CallExpr.Pos" data-kind="m">func (*CallExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L438">Pos</a> <a class="permalink" href="#CallExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CallExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L438">❖</a><pre>func (x *<a href="#CallExpr">CallExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="CaseClause" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L654">CaseClause</a> <a class="permalink" href="#CaseClause">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=CaseClause&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L654">❖</a><pre>type CaseClause struct {
    <span id="CaseClause.Case">Case</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;case&#34; or &#34;default&#34; keyword</span>
    <span id="CaseClause.List">List</span>  []<a href="#Expr">Expr</a>    <span class="com">// list of expressions or types; nil means default case</span>
    <span id="CaseClause.Colon">Colon</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;:&#34;</span>
    <span id="CaseClause.Body">Body</span>  []<a href="#Stmt">Stmt</a>    <span class="com">// statement list; or nil</span>
}</pre></div><p>
A CaseClause represents a case of an expression or type switch statement.
</p>

          
          
          
  


          

          
            <h4 id="CaseClause.End" data-kind="m">func (*CaseClause) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L771">End</a> <a class="permalink" href="#CaseClause.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CaseClause%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L771">❖</a><pre>func (s *<a href="#CaseClause">CaseClause</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="CaseClause.Pos" data-kind="m">func (*CaseClause) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L727">Pos</a> <a class="permalink" href="#CaseClause.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CaseClause%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L727">❖</a><pre>func (s *<a href="#CaseClause">CaseClause</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="ChanDir" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L362">ChanDir</a> <a class="permalink" href="#ChanDir">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ChanDir&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L362">❖</a><pre>type ChanDir <a href="/builtin#int">int</a></pre></div><p>
The direction of a channel type is indicated by one
of the following constants.
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L364">❖</a><pre>const (
    <span id="SEND">SEND</span> <a href="#ChanDir">ChanDir</a> = 1 &lt;&lt; <a href="/builtin#iota">iota</a>
    <span id="RECV">RECV</span>
)</pre></div>
          
          
  


          

          
        
          <h3 id="ChanType" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L412">ChanType</a> <a class="permalink" href="#ChanType">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ChanType&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L412">❖</a><pre>type ChanType struct {
    <span id="ChanType.Begin">Begin</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;chan&#34; keyword or &#34;&lt;-&#34; (whichever comes first)</span>
    <span id="ChanType.Arrow">Arrow</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;&lt;-&#34; (token.NoPos if there is no &#34;&lt;-&#34;)</span>
    <span id="ChanType.Dir">Dir</span>   <a href="#ChanDir">ChanDir</a>   <span class="com">// channel direction</span>
    <span id="ChanType.Value">Value</span> <a href="#Expr">Expr</a>      <span class="com">// value type</span>
}</pre></div><p>
A ChanType node represents a channel type.
</p>

          
          
          
  


          

          
            <h4 id="ChanType.End" data-kind="m">func (*ChanType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L486">End</a> <a class="permalink" href="#ChanType.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ChanType%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L486">❖</a><pre>func (x *<a href="#ChanType">ChanType</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ChanType.Pos" data-kind="m">func (*ChanType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L453">Pos</a> <a class="permalink" href="#ChanType.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ChanType%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L453">❖</a><pre>func (x *<a href="#ChanType">ChanType</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="CommClause" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L678">CommClause</a> <a class="permalink" href="#CommClause">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=CommClause&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L678">❖</a><pre>type CommClause struct {
    <span id="CommClause.Case">Case</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;case&#34; or &#34;default&#34; keyword</span>
    <span id="CommClause.Comm">Comm</span>  <a href="#Stmt">Stmt</a>      <span class="com">// send or receive statement; nil means default case</span>
    <span id="CommClause.Colon">Colon</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;:&#34;</span>
    <span id="CommClause.Body">Body</span>  []<a href="#Stmt">Stmt</a>    <span class="com">// statement list; or nil</span>
}</pre></div><p>
A CommClause node represents a case of a select statement.
</p>

          
          
          
  


          

          
            <h4 id="CommClause.End" data-kind="m">func (*CommClause) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L779">End</a> <a class="permalink" href="#CommClause.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommClause%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L779">❖</a><pre>func (s *<a href="#CommClause">CommClause</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="CommClause.Pos" data-kind="m">func (*CommClause) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L730">Pos</a> <a class="permalink" href="#CommClause.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommClause%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L730">❖</a><pre>func (s *<a href="#CommClause">CommClause</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Comment" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L62">Comment</a> <a class="permalink" href="#Comment">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Comment&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L62">❖</a><pre>type Comment struct {
    <span id="Comment.Slash">Slash</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;/&#34; starting the comment</span>
    <span id="Comment.Text">Text</span>  <a href="/builtin#string">string</a>    <span class="com">// comment text (excluding &#39;\n&#39; for //-style comments)</span>
}</pre></div><p>
A Comment node represents a single //-style or /*-style comment.
</p>

          
          
          
  


          

          
            <h4 id="Comment.End" data-kind="m">func (*Comment) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L68">End</a> <a class="permalink" href="#Comment.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Comment%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L68">❖</a><pre>func (c *<a href="#Comment">Comment</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Comment.Pos" data-kind="m">func (*Comment) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L67">Pos</a> <a class="permalink" href="#Comment.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Comment%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L67">❖</a><pre>func (c *<a href="#Comment">Comment</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="CommentGroup" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L73">CommentGroup</a> <a class="permalink" href="#CommentGroup">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=CommentGroup&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L73">❖</a><pre>type CommentGroup struct {
    <span id="CommentGroup.List">List</span> []*<a href="#Comment">Comment</a> <span class="com">// len(List) &gt; 0</span>
}</pre></div><p>
A CommentGroup represents a sequence of comments
with no other tokens and no empty lines between.
</p>

          
          
          
  


          

          
            <h4 id="CommentGroup.End" data-kind="m">func (*CommentGroup) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L78">End</a> <a class="permalink" href="#CommentGroup.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentGroup%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L78">❖</a><pre>func (g *<a href="#CommentGroup">CommentGroup</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="CommentGroup.Pos" data-kind="m">func (*CommentGroup) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L77">Pos</a> <a class="permalink" href="#CommentGroup.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentGroup%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L77">❖</a><pre>func (g *<a href="#CommentGroup">CommentGroup</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="CommentGroup.Text" data-kind="m">func (*CommentGroup) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L96">Text</a> <a class="permalink" href="#CommentGroup.Text">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentGroup%2FText&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L96">❖</a><pre>func (g *<a href="#CommentGroup">CommentGroup</a>) Text() <a href="/builtin#string">string</a></pre></div><p>
Text returns the text of the comment.
Comment markers (//, /*, and */), the first space of a line comment, and
leading and trailing empty lines are removed. Multiple empty lines are
reduced to one, and trailing space on lines is trimmed. Unless the result
is empty, it is newline-terminated.
</p>

            
  

          
        
          <h3 id="CommentMap" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L35">CommentMap</a> <a class="permalink" href="#CommentMap">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=CommentMap&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L35">❖</a><pre>type CommentMap map[<a href="#Node">Node</a>][]*<a href="#CommentGroup">CommentGroup</a></pre></div><p>
A CommentMap maps an AST node to a list of comment groups
associated with it. See NewCommentMap for a description of
the association.
</p>

          
          
          
  
    <div class="panel-group">
    
      <div class="panel panel-default" id="example-CommentMap">
        <div class="panel-heading"><a class="accordion-toggle" data-toggle="collapse" href="#ex-CommentMap">Example</a></div>
        <div id="ex-CommentMap" class="panel-collapse collapse"><div class="panel-body">
          <p><p>
This example illustrates how to remove a variable declaration
in a Go program while maintaining correct comment association
using an ast.CommentMap.
</p>

          <p>Code:
          <pre><span class="com">// src is the input for which we create the AST that we
// are going to manipulate.</span>
src := `
// This is the package comment.
package main

// This comment is associated with the hello constant.
const hello = &#34;Hello, World!&#34; // line comment 1

// This comment is associated with the foo variable.
var foo = hello // line comment 2 

// This comment is associated with the main function.
func main() {
	fmt.Println(hello) // line comment 3
}
`

<span class="com">// Create the AST by parsing src.</span>
fset := token.NewFileSet() <span class="com">// positions are relative to fset</span>
f, err := parser.ParseFile(fset, &#34;src.go&#34;, src, parser.ParseComments)
if err != nil {
    panic(err)
}

<span class="com">// Create an ast.CommentMap from the ast.File&#39;s comments.
// This helps keeping the association between comments
// and AST nodes.</span>
cmap := ast.NewCommentMap(fset, f, f.Comments)

<span class="com">// Remove the first variable declaration from the list of declarations.</span>
f.Decls = removeFirstVarDecl(f.Decls)

<span class="com">// Use the comment map to filter comments that don&#39;t belong anymore
// (the comments associated with the variable declaration), and create
// the new comments list.</span>
f.Comments = cmap.Filter(f).Comments()

<span class="com">// Print the modified AST.</span>
var buf bytes.Buffer
if err := format.Node(&amp;buf, fset, f); err != nil {
    panic(err)
}
fmt.Printf(&#34;%s&#34;, buf.Bytes())</pre>
          <p>Output:<pre>// This is the package comment.
package main

// This comment is associated with the hello constant.
const hello = &#34;Hello, World!&#34; // line comment 1

// This comment is associated with the main function.
func main() {
	fmt.Println(hello) // line comment 3
}
</pre>
        </div></div>
      </div>
    
    </div>
  


          
            <h4 id="NewCommentMap" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L143">NewCommentMap</a> <a class="permalink" href="#NewCommentMap">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewCommentMap&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L143">❖</a><pre>func NewCommentMap(fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, node <a href="#Node">Node</a>, comments []*<a href="#CommentGroup">CommentGroup</a>) <a href="#CommentMap">CommentMap</a></pre></div><p>
NewCommentMap creates a new comment map by associating comment groups
of the comments list with the nodes of the AST specified by node.
</p>
<p>
A comment group g is associated with a node n if:
</p>
<pre>- g starts on the same line as n ends
- g starts on the line immediately following n, and there is
  at least one empty line after g and before the next node
- g starts before n and is not associated to the node before n
  via the previous rules
</pre>
<p>
NewCommentMap tries to associate a comment group to the &#34;largest&#34;
node possible: For instance, if the comment is a line comment
trailing an assignment, the comment is associated with the entire
assignment rather than just the last operand in the assignment.
</p>

            
  

          

          
            <h4 id="CommentMap.Comments" data-kind="m">func (CommentMap) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L272">Comments</a> <a class="permalink" href="#CommentMap.Comments">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentMap%2FComments&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L272">❖</a><pre>func (cmap <a href="#CommentMap">CommentMap</a>) Comments() []*<a href="#CommentGroup">CommentGroup</a></pre></div><p>
Comments returns the list of comment groups in the comment map.
The result is sorted in source order.
</p>

            
  

          
            <h4 id="CommentMap.Filter" data-kind="m">func (CommentMap) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L258">Filter</a> <a class="permalink" href="#CommentMap.Filter">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentMap%2FFilter&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L258">❖</a><pre>func (cmap <a href="#CommentMap">CommentMap</a>) Filter(node <a href="#Node">Node</a>) <a href="#CommentMap">CommentMap</a></pre></div><p>
Filter returns a new comment map consisting of only those
entries of cmap for which a corresponding node exists in
the AST specified by node.
</p>

            
  

          
            <h4 id="CommentMap.String" data-kind="m">func (CommentMap) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L317">String</a> <a class="permalink" href="#CommentMap.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentMap%2FString&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L317">❖</a><pre>func (cmap <a href="#CommentMap">CommentMap</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
            <h4 id="CommentMap.Update" data-kind="m">func (CommentMap) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L246">Update</a> <a class="permalink" href="#CommentMap.Update">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CommentMap%2FUpdate&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/commentmap.go#L246">❖</a><pre>func (cmap <a href="#CommentMap">CommentMap</a>) Update(old, new <a href="#Node">Node</a>) <a href="#Node">Node</a></pre></div><p>
Update replaces an old node in the comment map with the new node
and returns the new node. Comments that were associated with the
old node are associated with the new node.
</p>

            
  

          
        
          <h3 id="CompositeLit" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L266">CompositeLit</a> <a class="permalink" href="#CompositeLit">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=CompositeLit&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L266">❖</a><pre>type CompositeLit struct {
    <span id="CompositeLit.Type">Type</span>   <a href="#Expr">Expr</a>      <span class="com">// literal type; or nil</span>
    <span id="CompositeLit.Lbrace">Lbrace</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;{&#34;</span>
    <span id="CompositeLit.Elts">Elts</span>   []<a href="#Expr">Expr</a>    <span class="com">// list of composite elements; or nil</span>
    <span id="CompositeLit.Rbrace">Rbrace</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;}&#34;</span>
}</pre></div><p>
A CompositeLit node represents a composite literal.
</p>

          
          
          
  


          

          
            <h4 id="CompositeLit.End" data-kind="m">func (*CompositeLit) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L465">End</a> <a class="permalink" href="#CompositeLit.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CompositeLit%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L465">❖</a><pre>func (x *<a href="#CompositeLit">CompositeLit</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="CompositeLit.Pos" data-kind="m">func (*CompositeLit) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L427">Pos</a> <a class="permalink" href="#CompositeLit.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=CompositeLit%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L427">❖</a><pre>func (x *<a href="#CompositeLit">CompositeLit</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Decl" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L53">Decl</a> <a class="permalink" href="#Decl">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Decl&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L53">❖</a><pre>type Decl interface {
    <a href="#Node">Node</a>
    <span class="com">// contains filtered or unexported methods</span>
}</pre></div><p>
All declaration nodes implement the Decl interface.
</p>

          
          
          
  


          

          
        
          <h3 id="DeclStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L559">DeclStmt</a> <a class="permalink" href="#DeclStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=DeclStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L559">❖</a><pre>type DeclStmt struct {
    <span id="DeclStmt.Decl">Decl</span> <a href="#Decl">Decl</a> <span class="com">// *GenDecl with CONST, TYPE, or VAR token</span>
}</pre></div><p>
A DeclStmt node represents a declaration in a statement list.
</p>

          
          
          
  


          

          
            <h4 id="DeclStmt.End" data-kind="m">func (*DeclStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L736">End</a> <a class="permalink" href="#DeclStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=DeclStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L736">❖</a><pre>func (s *<a href="#DeclStmt">DeclStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="DeclStmt.Pos" data-kind="m">func (*DeclStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L714">Pos</a> <a class="permalink" href="#DeclStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=DeclStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L714">❖</a><pre>func (s *<a href="#DeclStmt">DeclStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="DeferStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L617">DeferStmt</a> <a class="permalink" href="#DeferStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=DeferStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L617">❖</a><pre>type DeferStmt struct {
    <span id="DeferStmt.Defer">Defer</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;defer&#34; keyword</span>
    <span id="DeferStmt.Call">Call</span>  *<a href="#CallExpr">CallExpr</a>
}</pre></div><p>
A DeferStmt node represents a defer statement.
</p>

          
          
          
  


          

          
            <h4 id="DeferStmt.End" data-kind="m">func (*DeferStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L751">End</a> <a class="permalink" href="#DeferStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=DeferStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L751">❖</a><pre>func (s *<a href="#DeferStmt">DeferStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="DeferStmt.Pos" data-kind="m">func (*DeferStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L722">Pos</a> <a class="permalink" href="#DeferStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=DeferStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L722">❖</a><pre>func (s *<a href="#DeferStmt">DeferStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Ellipsis" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L247">Ellipsis</a> <a class="permalink" href="#Ellipsis">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Ellipsis&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L247">❖</a><pre>type Ellipsis struct {
    <span id="Ellipsis.Ellipsis">Ellipsis</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;...&#34;</span>
    <span id="Ellipsis.Elt">Elt</span>      <a href="#Expr">Expr</a>      <span class="com">// ellipsis element type (parameter lists only); or nil</span>
}</pre></div><p>
An Ellipsis node stands for the &#34;...&#34; type in a
parameter list or the &#34;...&#34; length in an array type.
</p>

          
          
          
  


          

          
            <h4 id="Ellipsis.End" data-kind="m">func (*Ellipsis) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L457">End</a> <a class="permalink" href="#Ellipsis.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Ellipsis%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L457">❖</a><pre>func (x *<a href="#Ellipsis">Ellipsis</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Ellipsis.Pos" data-kind="m">func (*Ellipsis) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L424">Pos</a> <a class="permalink" href="#Ellipsis.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Ellipsis%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L424">❖</a><pre>func (x *<a href="#Ellipsis">Ellipsis</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="EmptyStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L567">EmptyStmt</a> <a class="permalink" href="#EmptyStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=EmptyStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L567">❖</a><pre>type EmptyStmt struct {
    <span id="EmptyStmt.Semicolon">Semicolon</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of following &#34;;&#34;</span>
    <span id="EmptyStmt.Implicit">Implicit</span>  <a href="/builtin#bool">bool</a>      <span class="com">// if set, &#34;;&#34; was omitted in the source</span>
}</pre></div><p>
An EmptyStmt node represents an empty statement.
The &#34;position&#34; of the empty statement is the position
of the immediately following (explicit or implicit) semicolon.
</p>

          
          
          
  


          

          
            <h4 id="EmptyStmt.End" data-kind="m">func (*EmptyStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L737">End</a> <a class="permalink" href="#EmptyStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=EmptyStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L737">❖</a><pre>func (s *<a href="#EmptyStmt">EmptyStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="EmptyStmt.Pos" data-kind="m">func (*EmptyStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L715">Pos</a> <a class="permalink" href="#EmptyStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=EmptyStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L715">❖</a><pre>func (s *<a href="#EmptyStmt">EmptyStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Expr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L41">Expr</a> <a class="permalink" href="#Expr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Expr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L41">❖</a><pre>type Expr interface {
    <a href="#Node">Node</a>
    <span class="com">// contains filtered or unexported methods</span>
}</pre></div><p>
All expression nodes implement the Expr interface.
</p>

          
          
          
  


          

          
        
          <h3 id="ExprStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L582">ExprStmt</a> <a class="permalink" href="#ExprStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ExprStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L582">❖</a><pre>type ExprStmt struct {
    <span id="ExprStmt.X">X</span> <a href="#Expr">Expr</a> <span class="com">// expression</span>
}</pre></div><p>
An ExprStmt node represents a (stand-alone) expression
in a statement list.
</p>

          
          
          
  


          

          
            <h4 id="ExprStmt.End" data-kind="m">func (*ExprStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L744">End</a> <a class="permalink" href="#ExprStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ExprStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L744">❖</a><pre>func (s *<a href="#ExprStmt">ExprStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ExprStmt.Pos" data-kind="m">func (*ExprStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L717">Pos</a> <a class="permalink" href="#ExprStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ExprStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L717">❖</a><pre>func (s *<a href="#ExprStmt">ExprStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Field" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L157">Field</a> <a class="permalink" href="#Field">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Field&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L157">❖</a><pre>type Field struct {
    <span id="Field.Doc">Doc</span>     *<a href="#CommentGroup">CommentGroup</a> <span class="com">// associated documentation; or nil</span>
    <span id="Field.Names">Names</span>   []*<a href="#Ident">Ident</a>      <span class="com">// field/method/parameter names; or nil if anonymous field</span>
    <span id="Field.Type">Type</span>    <a href="#Expr">Expr</a>          <span class="com">// field/method/parameter type</span>
    <span id="Field.Tag">Tag</span>     *<a href="#BasicLit">BasicLit</a>     <span class="com">// field tag; or nil</span>
    <span id="Field.Comment">Comment</span> *<a href="#CommentGroup">CommentGroup</a> <span class="com">// line comments; or nil</span>
}</pre></div><p>
A Field represents a Field declaration list in a struct type,
a method list in an interface type, or a parameter/result declaration
in a signature.
</p>

          
          
          
  


          

          
            <h4 id="Field.End" data-kind="m">func (*Field) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L172">End</a> <a class="permalink" href="#Field.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Field%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L172">❖</a><pre>func (f *<a href="#Field">Field</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Field.Pos" data-kind="m">func (*Field) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L165">Pos</a> <a class="permalink" href="#Field.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Field%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L165">❖</a><pre>func (f *<a href="#Field">Field</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="FieldFilter" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L18">FieldFilter</a> <a class="permalink" href="#FieldFilter">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=FieldFilter&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/print.go#L18">❖</a><pre>type FieldFilter func(name <a href="/builtin#string">string</a>, value <a href="/reflect">reflect</a>.<a href="/reflect#Value">Value</a>) <a href="/builtin#bool">bool</a></pre></div><p>
A FieldFilter may be provided to Fprint to control the output.
</p>

          
          
          
  


          

          
        
          <h3 id="FieldList" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L180">FieldList</a> <a class="permalink" href="#FieldList">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=FieldList&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L180">❖</a><pre>type FieldList struct {
    <span id="FieldList.Opening">Opening</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of opening parenthesis/brace, if any</span>
    <span id="FieldList.List">List</span>    []*<a href="#Field">Field</a>  <span class="com">// field list; or nil</span>
    <span id="FieldList.Closing">Closing</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of closing parenthesis/brace, if any</span>
}</pre></div><p>
A FieldList represents a list of Fields, enclosed by parentheses or braces.
</p>

          
          
          
  


          

          
            <h4 id="FieldList.End" data-kind="m">func (*FieldList) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L198">End</a> <a class="permalink" href="#FieldList.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FieldList%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L198">❖</a><pre>func (f *<a href="#FieldList">FieldList</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="FieldList.NumFields" data-kind="m">func (*FieldList) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L211">NumFields</a> <a class="permalink" href="#FieldList.NumFields">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FieldList%2FNumFields&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L211">❖</a><pre>func (f *<a href="#FieldList">FieldList</a>) NumFields() <a href="/builtin#int">int</a></pre></div><p>
NumFields returns the number of (named and anonymous fields) in a FieldList.
</p>

            
  

          
            <h4 id="FieldList.Pos" data-kind="m">func (*FieldList) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L186">Pos</a> <a class="permalink" href="#FieldList.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FieldList%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L186">❖</a><pre>func (f *<a href="#FieldList">FieldList</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="File" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L969">File</a> <a class="permalink" href="#File">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=File&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L969">❖</a><pre>type File struct {
    <span id="File.Doc">Doc</span>        *<a href="#CommentGroup">CommentGroup</a>   <span class="com">// associated documentation; or nil</span>
    <span id="File.Package">Package</span>    <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>       <span class="com">// position of &#34;package&#34; keyword</span>
    <span id="File.Name">Name</span>       *<a href="#Ident">Ident</a>          <span class="com">// package name</span>
    <span id="File.Decls">Decls</span>      []<a href="#Decl">Decl</a>          <span class="com">// top-level declarations; or nil</span>
    <span id="File.Scope">Scope</span>      *<a href="#Scope">Scope</a>          <span class="com">// package scope (this file only)</span>
    <span id="File.Imports">Imports</span>    []*<a href="#ImportSpec">ImportSpec</a>   <span class="com">// imports in this file</span>
    <span id="File.Unresolved">Unresolved</span> []*<a href="#Ident">Ident</a>        <span class="com">// unresolved identifiers in this file</span>
    <span id="File.Comments">Comments</span>   []*<a href="#CommentGroup">CommentGroup</a> <span class="com">// list of all comments in the source file</span>
}</pre></div><p>
A File node represents a Go source file.
</p>
<p>
The Comments list contains all comments in the source file in order of
appearance, including the comments that are pointed to from other nodes
via Doc and Comment fields.
</p>

          
          
          
  


          
            <h4 id="MergePackageFiles" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L315">MergePackageFiles</a> <a class="permalink" href="#MergePackageFiles">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=MergePackageFiles&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L315">❖</a><pre>func MergePackageFiles(pkg *<a href="#Package">Package</a>, mode <a href="#MergeMode">MergeMode</a>) *<a href="#File">File</a></pre></div><p>
MergePackageFiles creates a file AST by merging the ASTs of the
files belonging to a package. The mode flags control merging behavior.
</p>

            
  

          

          
            <h4 id="File.End" data-kind="m">func (*File) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L981">End</a> <a class="permalink" href="#File.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=File%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L981">❖</a><pre>func (f *<a href="#File">File</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="File.Pos" data-kind="m">func (*File) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L980">Pos</a> <a class="permalink" href="#File.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=File%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L980">❖</a><pre>func (f *<a href="#File">File</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Filter" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L46">Filter</a> <a class="permalink" href="#Filter">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Filter&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L46">❖</a><pre>type Filter func(<a href="/builtin#string">string</a>) <a href="/builtin#bool">bool</a></pre></div>
          
          
          
  


          

          
        
          <h3 id="ForStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L692">ForStmt</a> <a class="permalink" href="#ForStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ForStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L692">❖</a><pre>type ForStmt struct {
    <span id="ForStmt.For">For</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;for&#34; keyword</span>
    <span id="ForStmt.Init">Init</span> <a href="#Stmt">Stmt</a>      <span class="com">// initialization statement; or nil</span>
    <span id="ForStmt.Cond">Cond</span> <a href="#Expr">Expr</a>      <span class="com">// condition; or nil</span>
    <span id="ForStmt.Post">Post</span> <a href="#Stmt">Stmt</a>      <span class="com">// post iteration statement; or nil</span>
    <span id="ForStmt.Body">Body</span> *<a href="#BlockStmt">BlockStmt</a>
}</pre></div><p>
A ForStmt represents a for statement.
</p>

          
          
          
  


          

          
            <h4 id="ForStmt.End" data-kind="m">func (*ForStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L786">End</a> <a class="permalink" href="#ForStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ForStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L786">❖</a><pre>func (s *<a href="#ForStmt">ForStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ForStmt.Pos" data-kind="m">func (*ForStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L732">Pos</a> <a class="permalink" href="#ForStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ForStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L732">❖</a><pre>func (s *<a href="#ForStmt">ForStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="FuncDecl" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L924">FuncDecl</a> <a class="permalink" href="#FuncDecl">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=FuncDecl&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L924">❖</a><pre>type FuncDecl struct {
    <span id="FuncDecl.Doc">Doc</span>  *<a href="#CommentGroup">CommentGroup</a> <span class="com">// associated documentation; or nil</span>
    <span id="FuncDecl.Recv">Recv</span> *<a href="#FieldList">FieldList</a>    <span class="com">// receiver (methods); or nil (functions)</span>
    <span id="FuncDecl.Name">Name</span> *<a href="#Ident">Ident</a>        <span class="com">// function/method name</span>
    <span id="FuncDecl.Type">Type</span> *<a href="#FuncType">FuncType</a>     <span class="com">// function signature: parameters, results, and position of &#34;func&#34; keyword</span>
    <span id="FuncDecl.Body">Body</span> *<a href="#BlockStmt">BlockStmt</a>    <span class="com">// function body; or nil (forward declaration)</span>
}</pre></div><p>
A FuncDecl node represents a function declaration.
</p>

          
          
          
  


          

          
            <h4 id="FuncDecl.End" data-kind="m">func (*FuncDecl) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L946">End</a> <a class="permalink" href="#FuncDecl.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FuncDecl%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L946">❖</a><pre>func (d *<a href="#FuncDecl">FuncDecl</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="FuncDecl.Pos" data-kind="m">func (*FuncDecl) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L937">Pos</a> <a class="permalink" href="#FuncDecl.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FuncDecl%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L937">❖</a><pre>func (d *<a href="#FuncDecl">FuncDecl</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="FuncLit" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L260">FuncLit</a> <a class="permalink" href="#FuncLit">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=FuncLit&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L260">❖</a><pre>type FuncLit struct {
    <span id="FuncLit.Type">Type</span> *<a href="#FuncType">FuncType</a>  <span class="com">// function type</span>
    <span id="FuncLit.Body">Body</span> *<a href="#BlockStmt">BlockStmt</a> <span class="com">// function body</span>
}</pre></div><p>
A FuncLit node represents a function literal.
</p>

          
          
          
  


          

          
            <h4 id="FuncLit.End" data-kind="m">func (*FuncLit) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L464">End</a> <a class="permalink" href="#FuncLit.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FuncLit%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L464">❖</a><pre>func (x *<a href="#FuncLit">FuncLit</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="FuncLit.Pos" data-kind="m">func (*FuncLit) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L426">Pos</a> <a class="permalink" href="#FuncLit.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FuncLit%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L426">❖</a><pre>func (x *<a href="#FuncLit">FuncLit</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="FuncType" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L391">FuncType</a> <a class="permalink" href="#FuncType">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=FuncType&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L391">❖</a><pre>type FuncType struct {
    <span id="FuncType.Func">Func</span>    <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>  <span class="com">// position of &#34;func&#34; keyword (token.NoPos if there is no &#34;func&#34;)</span>
    <span id="FuncType.Params">Params</span>  *<a href="#FieldList">FieldList</a> <span class="com">// (incoming) parameters; non-nil</span>
    <span id="FuncType.Results">Results</span> *<a href="#FieldList">FieldList</a> <span class="com">// (outgoing) results; or nil</span>
}</pre></div><p>
A FuncType node represents a function type.
</p>

          
          
          
  


          

          
            <h4 id="FuncType.End" data-kind="m">func (*FuncType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L478">End</a> <a class="permalink" href="#FuncType.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FuncType%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L478">❖</a><pre>func (x *<a href="#FuncType">FuncType</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="FuncType.Pos" data-kind="m">func (*FuncType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L445">Pos</a> <a class="permalink" href="#FuncType.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=FuncType%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L445">❖</a><pre>func (x *<a href="#FuncType">FuncType</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="GenDecl" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L914">GenDecl</a> <a class="permalink" href="#GenDecl">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=GenDecl&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L914">❖</a><pre>type GenDecl struct {
    <span id="GenDecl.Doc">Doc</span>    *<a href="#CommentGroup">CommentGroup</a> <span class="com">// associated documentation; or nil</span>
    <span id="GenDecl.TokPos">TokPos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>     <span class="com">// position of Tok</span>
    <span id="GenDecl.Tok">Tok</span>    <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a>   <span class="com">// IMPORT, CONST, TYPE, VAR</span>
    <span id="GenDecl.Lparen">Lparen</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>     <span class="com">// position of &#39;(&#39;, if any</span>
    <span id="GenDecl.Specs">Specs</span>  []<a href="#Spec">Spec</a>
    <span id="GenDecl.Rparen">Rparen</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#39;)&#39;, if any</span>
}</pre></div><p>
A GenDecl node (generic declaration node) represents an import,
constant, type or variable declaration. A valid Lparen position
(Lparen.IsValid()) indicates a parenthesized declaration.
</p>
<p>
Relationship between Tok value and Specs element type:
</p>
<pre>token.IMPORT  *ImportSpec
token.CONST   *ValueSpec
token.TYPE    *TypeSpec
token.VAR     *ValueSpec
</pre>

          
          
          
  


          

          
            <h4 id="GenDecl.End" data-kind="m">func (*GenDecl) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L940">End</a> <a class="permalink" href="#GenDecl.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=GenDecl%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L940">❖</a><pre>func (d *<a href="#GenDecl">GenDecl</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="GenDecl.Pos" data-kind="m">func (*GenDecl) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L936">Pos</a> <a class="permalink" href="#GenDecl.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=GenDecl%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L936">❖</a><pre>func (d *<a href="#GenDecl">GenDecl</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="GoStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L611">GoStmt</a> <a class="permalink" href="#GoStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=GoStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L611">❖</a><pre>type GoStmt struct {
    <span id="GoStmt.Go">Go</span>   <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;go&#34; keyword</span>
    <span id="GoStmt.Call">Call</span> *<a href="#CallExpr">CallExpr</a>
}</pre></div><p>
A GoStmt node represents a go statement.
</p>

          
          
          
  


          

          
            <h4 id="GoStmt.End" data-kind="m">func (*GoStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L750">End</a> <a class="permalink" href="#GoStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=GoStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L750">❖</a><pre>func (s *<a href="#GoStmt">GoStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="GoStmt.Pos" data-kind="m">func (*GoStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L721">Pos</a> <a class="permalink" href="#GoStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=GoStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L721">❖</a><pre>func (s *<a href="#GoStmt">GoStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Ident" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L238">Ident</a> <a class="permalink" href="#Ident">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Ident&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L238">❖</a><pre>type Ident struct {
    <span id="Ident.NamePos">NamePos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// identifier position</span>
    <span id="Ident.Name">Name</span>    <a href="/builtin#string">string</a>    <span class="com">// identifier name</span>
    <span id="Ident.Obj">Obj</span>     *<a href="#Object">Object</a>   <span class="com">// denoted object; or nil</span>
}</pre></div><p>
An Ident node represents an identifier.
</p>

          
          
          
  


          
            <h4 id="NewIdent" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L521">NewIdent</a> <a class="permalink" href="#NewIdent">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewIdent&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L521">❖</a><pre>func NewIdent(name <a href="/builtin#string">string</a>) *<a href="#Ident">Ident</a></pre></div><p>
NewIdent creates a new Ident without position.
Useful for ASTs generated by code other than the Go parser.
</p>

            
  

          

          
            <h4 id="Ident.End" data-kind="m">func (*Ident) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L456">End</a> <a class="permalink" href="#Ident.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Ident%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L456">❖</a><pre>func (x *<a href="#Ident">Ident</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Ident.IsExported" data-kind="m">func (*Ident) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L534">IsExported</a> <a class="permalink" href="#Ident.IsExported">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Ident%2FIsExported&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L534">❖</a><pre>func (id *<a href="#Ident">Ident</a>) IsExported() <a href="/builtin#bool">bool</a></pre></div><p>
IsExported reports whether id is an exported Go symbol
(that is, whether it begins with an uppercase letter).
</p>

            
  

          
            <h4 id="Ident.Pos" data-kind="m">func (*Ident) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L423">Pos</a> <a class="permalink" href="#Ident.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Ident%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L423">❖</a><pre>func (x *<a href="#Ident">Ident</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Ident.String" data-kind="m">func (*Ident) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L536">String</a> <a class="permalink" href="#Ident.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Ident%2FString&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L536">❖</a><pre>func (id *<a href="#Ident">Ident</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
        
          <h3 id="IfStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L645">IfStmt</a> <a class="permalink" href="#IfStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=IfStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L645">❖</a><pre>type IfStmt struct {
    <span id="IfStmt.If">If</span>   <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;if&#34; keyword</span>
    <span id="IfStmt.Init">Init</span> <a href="#Stmt">Stmt</a>      <span class="com">// initialization statement; or nil</span>
    <span id="IfStmt.Cond">Cond</span> <a href="#Expr">Expr</a>      <span class="com">// condition</span>
    <span id="IfStmt.Body">Body</span> *<a href="#BlockStmt">BlockStmt</a>
    <span id="IfStmt.Else">Else</span> <a href="#Stmt">Stmt</a> <span class="com">// else branch; or nil</span>
}</pre></div><p>
An IfStmt node represents an if statement.
</p>

          
          
          
  


          

          
            <h4 id="IfStmt.End" data-kind="m">func (*IfStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L765">End</a> <a class="permalink" href="#IfStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=IfStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L765">❖</a><pre>func (s *<a href="#IfStmt">IfStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="IfStmt.Pos" data-kind="m">func (*IfStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L726">Pos</a> <a class="permalink" href="#IfStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=IfStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L726">❖</a><pre>func (s *<a href="#IfStmt">IfStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="ImportSpec" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L828">ImportSpec</a> <a class="permalink" href="#ImportSpec">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ImportSpec&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L828">❖</a><pre>type ImportSpec struct {
    <span id="ImportSpec.Doc">Doc</span>     *<a href="#CommentGroup">CommentGroup</a> <span class="com">// associated documentation; or nil</span>
    <span id="ImportSpec.Name">Name</span>    *<a href="#Ident">Ident</a>        <span class="com">// local package name (including &#34;.&#34;); or nil</span>
    <span id="ImportSpec.Path">Path</span>    *<a href="#BasicLit">BasicLit</a>     <span class="com">// import path</span>
    <span id="ImportSpec.Comment">Comment</span> *<a href="#CommentGroup">CommentGroup</a> <span class="com">// line comments; or nil</span>
    <span id="ImportSpec.EndPos">EndPos</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>     <span class="com">// end of spec (overrides Path.Pos if nonzero)</span>
}</pre></div><p>
An ImportSpec node represents a single package import.
</p>

          
          
          
  


          

          
            <h4 id="ImportSpec.End" data-kind="m">func (*ImportSpec) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L867">End</a> <a class="permalink" href="#ImportSpec.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ImportSpec%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L867">❖</a><pre>func (s *<a href="#ImportSpec">ImportSpec</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ImportSpec.Pos" data-kind="m">func (*ImportSpec) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L858">Pos</a> <a class="permalink" href="#ImportSpec.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ImportSpec%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L858">❖</a><pre>func (s *<a href="#ImportSpec">ImportSpec</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Importer" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/resolve.go#L63">Importer</a> <a class="permalink" href="#Importer">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Importer&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/resolve.go#L63">❖</a><pre>type Importer func(imports map[<a href="/builtin#string">string</a>]*<a href="#Object">Object</a>, path <a href="/builtin#string">string</a>) (pkg *<a href="#Object">Object</a>, err <a href="/builtin#error">error</a>)</pre></div><p>
An Importer resolves import paths to package Objects.
The imports map records the packages already imported,
indexed by package id (canonical import path).
An Importer must determine the canonical import path and
check the map to see if it is already present in the imports map.
If so, the Importer can return the map entry. Otherwise, the
Importer should load the package data for the given path into
a new *Object (pkg), record pkg in the imports map, and then
return pkg.
</p>

          
          
          
  


          

          
        
          <h3 id="IncDecStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L594">IncDecStmt</a> <a class="permalink" href="#IncDecStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=IncDecStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L594">❖</a><pre>type IncDecStmt struct {
    <span id="IncDecStmt.X">X</span>      <a href="#Expr">Expr</a>
    <span id="IncDecStmt.TokPos">TokPos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of Tok</span>
    <span id="IncDecStmt.Tok">Tok</span>    <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// INC or DEC</span>
}</pre></div><p>
An IncDecStmt node represents an increment or decrement statement.
</p>

          
          
          
  


          

          
            <h4 id="IncDecStmt.End" data-kind="m">func (*IncDecStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L746">End</a> <a class="permalink" href="#IncDecStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=IncDecStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L746">❖</a><pre>func (s *<a href="#IncDecStmt">IncDecStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="IncDecStmt.Pos" data-kind="m">func (*IncDecStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L719">Pos</a> <a class="permalink" href="#IncDecStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=IncDecStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L719">❖</a><pre>func (s *<a href="#IncDecStmt">IncDecStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="IndexExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L287">IndexExpr</a> <a class="permalink" href="#IndexExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=IndexExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L287">❖</a><pre>type IndexExpr struct {
    <span id="IndexExpr.X">X</span>      <a href="#Expr">Expr</a>      <span class="com">// expression</span>
    <span id="IndexExpr.Lbrack">Lbrack</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;[&#34;</span>
    <span id="IndexExpr.Index">Index</span>  <a href="#Expr">Expr</a>      <span class="com">// index expression</span>
    <span id="IndexExpr.Rbrack">Rbrack</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;]&#34;</span>
}</pre></div><p>
An IndexExpr node represents an expression followed by an index.
</p>

          
          
          
  


          

          
            <h4 id="IndexExpr.End" data-kind="m">func (*IndexExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L468">End</a> <a class="permalink" href="#IndexExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=IndexExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L468">❖</a><pre>func (x *<a href="#IndexExpr">IndexExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="IndexExpr.Pos" data-kind="m">func (*IndexExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L435">Pos</a> <a class="permalink" href="#IndexExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=IndexExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L435">❖</a><pre>func (x *<a href="#IndexExpr">IndexExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="InterfaceType" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L398">InterfaceType</a> <a class="permalink" href="#InterfaceType">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=InterfaceType&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L398">❖</a><pre>type InterfaceType struct {
    <span id="InterfaceType.Interface">Interface</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>  <span class="com">// position of &#34;interface&#34; keyword</span>
    <span id="InterfaceType.Methods">Methods</span>    *<a href="#FieldList">FieldList</a> <span class="com">// list of methods</span>
    <span id="InterfaceType.Incomplete">Incomplete</span> <a href="/builtin#bool">bool</a>       <span class="com">// true if (source) methods are missing in the Methods list</span>
}</pre></div><p>
An InterfaceType node represents an interface type.
</p>

          
          
          
  


          

          
            <h4 id="InterfaceType.End" data-kind="m">func (*InterfaceType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L484">End</a> <a class="permalink" href="#InterfaceType.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=InterfaceType%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L484">❖</a><pre>func (x *<a href="#InterfaceType">InterfaceType</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="InterfaceType.Pos" data-kind="m">func (*InterfaceType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L451">Pos</a> <a class="permalink" href="#InterfaceType.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=InterfaceType%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L451">❖</a><pre>func (x *<a href="#InterfaceType">InterfaceType</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="KeyValueExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L352">KeyValueExpr</a> <a class="permalink" href="#KeyValueExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=KeyValueExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L352">❖</a><pre>type KeyValueExpr struct {
    <span id="KeyValueExpr.Key">Key</span>   <a href="#Expr">Expr</a>
    <span id="KeyValueExpr.Colon">Colon</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;:&#34;</span>
    <span id="KeyValueExpr.Value">Value</span> <a href="#Expr">Expr</a>
}</pre></div><p>
A KeyValueExpr node represents (key : value) pairs
in composite literals.
</p>

          
          
          
  


          

          
            <h4 id="KeyValueExpr.End" data-kind="m">func (*KeyValueExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L475">End</a> <a class="permalink" href="#KeyValueExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=KeyValueExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L475">❖</a><pre>func (x *<a href="#KeyValueExpr">KeyValueExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="KeyValueExpr.Pos" data-kind="m">func (*KeyValueExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L442">Pos</a> <a class="permalink" href="#KeyValueExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=KeyValueExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L442">❖</a><pre>func (x *<a href="#KeyValueExpr">KeyValueExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="LabeledStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L573">LabeledStmt</a> <a class="permalink" href="#LabeledStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=LabeledStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L573">❖</a><pre>type LabeledStmt struct {
    <span id="LabeledStmt.Label">Label</span> *<a href="#Ident">Ident</a>
    <span id="LabeledStmt.Colon">Colon</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;:&#34;</span>
    <span id="LabeledStmt.Stmt">Stmt</span>  <a href="#Stmt">Stmt</a>
}</pre></div><p>
A LabeledStmt node represents a labeled statement.
</p>

          
          
          
  


          

          
            <h4 id="LabeledStmt.End" data-kind="m">func (*LabeledStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L743">End</a> <a class="permalink" href="#LabeledStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=LabeledStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L743">❖</a><pre>func (s *<a href="#LabeledStmt">LabeledStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="LabeledStmt.Pos" data-kind="m">func (*LabeledStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L716">Pos</a> <a class="permalink" href="#LabeledStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=LabeledStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L716">❖</a><pre>func (s *<a href="#LabeledStmt">LabeledStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="MapType" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L405">MapType</a> <a class="permalink" href="#MapType">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=MapType&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L405">❖</a><pre>type MapType struct {
    <span id="MapType.Map">Map</span>   <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;map&#34; keyword</span>
    <span id="MapType.Key">Key</span>   <a href="#Expr">Expr</a>
    <span id="MapType.Value">Value</span> <a href="#Expr">Expr</a>
}</pre></div><p>
A MapType node represents a map type.
</p>

          
          
          
  


          

          
            <h4 id="MapType.End" data-kind="m">func (*MapType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L485">End</a> <a class="permalink" href="#MapType.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=MapType%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L485">❖</a><pre>func (x *<a href="#MapType">MapType</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="MapType.Pos" data-kind="m">func (*MapType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L452">Pos</a> <a class="permalink" href="#MapType.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=MapType%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L452">❖</a><pre>func (x *<a href="#MapType">MapType</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="MergeMode" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L274">MergeMode</a> <a class="permalink" href="#MergeMode">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=MergeMode&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L274">❖</a><pre>type MergeMode <a href="/builtin#uint">uint</a></pre></div><p>
The MergeMode flags control the behavior of MergePackageFiles.
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/filter.go#L276">❖</a><pre>const (
    <span class="com">// If set, duplicate function declarations are excluded.</span>
    <span id="FilterFuncDuplicates">FilterFuncDuplicates</span> <a href="#MergeMode">MergeMode</a> = 1 &lt;&lt; <a href="/builtin#iota">iota</a>
    <span class="com">// If set, comments that are not associated with a specific
    // AST node (as Doc or Comment) are excluded.</span>
    <span id="FilterUnassociatedComments">FilterUnassociatedComments</span>
    <span class="com">// If set, duplicate import declarations are excluded.</span>
    <span id="FilterImportDuplicates">FilterImportDuplicates</span>
)</pre></div>
          
          
  


          

          
        
          <h3 id="Node" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L35">Node</a> <a class="permalink" href="#Node">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Node&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L35">❖</a><pre>type Node interface {
    <span id="Node.Pos">Pos</span>() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of first character belonging to the node</span>
    <span id="Node.End">End</span>() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of first character immediately after the node</span>
}</pre></div><p>
All node types implement the Node interface.
</p>

          
          
          
  


          

          
        
          <h3 id="ObjKind" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L137">ObjKind</a> <a class="permalink" href="#ObjKind">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ObjKind&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L137">❖</a><pre>type ObjKind <a href="/builtin#int">int</a></pre></div><p>
ObjKind describes what an object represents.
</p>

          <div class="decl" data-kind="c"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L140">❖</a><pre>const (
    <span id="Bad">Bad</span> <a href="#ObjKind">ObjKind</a> = <a href="/builtin#iota">iota</a> <span class="com">// for error handling</span>
    <span id="Pkg">Pkg</span>                <span class="com">// package</span>
    <span id="Con">Con</span>                <span class="com">// constant</span>
    <span id="Typ">Typ</span>                <span class="com">// type</span>
    <span id="Var">Var</span>                <span class="com">// variable</span>
    <span id="Fun">Fun</span>                <span class="com">// function or method</span>
    <span id="Lbl">Lbl</span>                <span class="com">// label</span>
)</pre></div><p>
The list of possible Object kinds.
</p>

          
          
  


          

          
            <h4 id="ObjKind.String" data-kind="m">func (ObjKind) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L160">String</a> <a class="permalink" href="#ObjKind.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ObjKind%2FString&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L160">❖</a><pre>func (kind <a href="#ObjKind">ObjKind</a>) String() <a href="/builtin#string">string</a></pre></div>
            
  

          
        
          <h3 id="Object" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L76">Object</a> <a class="permalink" href="#Object">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Object&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L76">❖</a><pre>type Object struct {
    <span id="Object.Kind">Kind</span> <a href="#ObjKind">ObjKind</a>
    <span id="Object.Name">Name</span> <a href="/builtin#string">string</a>      <span class="com">// declared name</span>
    <span id="Object.Decl">Decl</span> interface{} <span class="com">// corresponding Field, XxxSpec, FuncDecl, LabeledStmt, AssignStmt, Scope; or nil</span>
    <span id="Object.Data">Data</span> interface{} <span class="com">// object-specific data; or nil</span>
    <span id="Object.Type">Type</span> interface{} <span class="com">// placeholder for type information; may be nil</span>
}</pre></div><p>
An Object describes a named language entity such as a package,
constant, type, variable, function (incl. methods), or label.
</p>
<p>
The Data fields contains object-specific data:
</p>
<pre>Kind    Data type         Data value
Pkg     *Scope            package scope
Con     int               iota for the respective declaration
</pre>

          
          
          
  


          
            <h4 id="NewObj" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L85">NewObj</a> <a class="permalink" href="#NewObj">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewObj&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L85">❖</a><pre>func NewObj(kind <a href="#ObjKind">ObjKind</a>, name <a href="/builtin#string">string</a>) *<a href="#Object">Object</a></pre></div><p>
NewObj creates a new object of a given kind and name.
</p>

            
  

          

          
            <h4 id="Object.Pos" data-kind="m">func (*Object) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L92">Pos</a> <a class="permalink" href="#Object.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Object%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L92">❖</a><pre>func (obj *<a href="#Object">Object</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div><p>
Pos computes the source position of the declaration of an object name.
The result may be an invalid position if it cannot be computed
(obj.Decl may be nil or not correct).
</p>

            
  

          
        
          <h3 id="Package" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L991">Package</a> <a class="permalink" href="#Package">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Package&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L991">❖</a><pre>type Package struct {
    <span id="Package.Name">Name</span>    <a href="/builtin#string">string</a>             <span class="com">// package name</span>
    <span id="Package.Scope">Scope</span>   *<a href="#Scope">Scope</a>             <span class="com">// package scope across all files</span>
    <span id="Package.Imports">Imports</span> map[<a href="/builtin#string">string</a>]*<a href="#Object">Object</a> <span class="com">// map of package id -&gt; package object</span>
    <span id="Package.Files">Files</span>   map[<a href="/builtin#string">string</a>]*<a href="#File">File</a>   <span class="com">// Go source files by filename</span>
}</pre></div><p>
A Package node represents a set of source files
collectively building a Go package.
</p>

          
          
          
  


          
            <h4 id="NewPackage" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/resolve.go#L74">NewPackage</a> <a class="permalink" href="#NewPackage">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewPackage&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/resolve.go#L74">❖</a><pre>func NewPackage(fset *<a href="/go/token">token</a>.<a href="/go/token#FileSet">FileSet</a>, files map[<a href="/builtin#string">string</a>]*<a href="#File">File</a>, importer <a href="#Importer">Importer</a>, universe *<a href="#Scope">Scope</a>) (*<a href="#Package">Package</a>, <a href="/builtin#error">error</a>)</pre></div><p>
NewPackage creates a new Package node from a set of File nodes. It resolves
unresolved identifiers across files and updates each file&#39;s Unresolved list
accordingly. If a non-nil importer and universe scope are provided, they are
used to resolve identifiers not declared in any of the package files. Any
remaining unresolved identifiers are reported as undeclared. If the files
belong to different packages, one package name is selected and files with
different package names are reported and then ignored.
The result is a package node and a scanner.ErrorList if there were errors.
</p>

            
  

          

          
            <h4 id="Package.End" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L999">End</a> <a class="permalink" href="#Package.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L999">❖</a><pre>func (p *<a href="#Package">Package</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="Package.Pos" data-kind="m">func (*Package) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L998">Pos</a> <a class="permalink" href="#Package.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Package%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L998">❖</a><pre>func (p *<a href="#Package">Package</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="ParenExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L274">ParenExpr</a> <a class="permalink" href="#ParenExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ParenExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L274">❖</a><pre>type ParenExpr struct {
    <span id="ParenExpr.Lparen">Lparen</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;(&#34;</span>
    <span id="ParenExpr.X">X</span>      <a href="#Expr">Expr</a>      <span class="com">// parenthesized expression</span>
    <span id="ParenExpr.Rparen">Rparen</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;)&#34;</span>
}</pre></div><p>
A ParenExpr node represents a parenthesized expression.
</p>

          
          
          
  


          

          
            <h4 id="ParenExpr.End" data-kind="m">func (*ParenExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L466">End</a> <a class="permalink" href="#ParenExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ParenExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L466">❖</a><pre>func (x *<a href="#ParenExpr">ParenExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ParenExpr.Pos" data-kind="m">func (*ParenExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L433">Pos</a> <a class="permalink" href="#ParenExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ParenExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L433">❖</a><pre>func (x *<a href="#ParenExpr">ParenExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="RangeStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L701">RangeStmt</a> <a class="permalink" href="#RangeStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=RangeStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L701">❖</a><pre>type RangeStmt struct {
    <span id="RangeStmt.For">For</span>        <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of &#34;for&#34; keyword</span>
    <span id="RangeStmt.Key">Key</span>, <span id="RangeStmt.Value">Value</span> <a href="#Expr">Expr</a>        <span class="com">// Key, Value may be nil</span>
    <span id="RangeStmt.TokPos">TokPos</span>     <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of Tok; invalid if Key == nil</span>
    <span id="RangeStmt.Tok">Tok</span>        <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// ILLEGAL if Key == nil, ASSIGN, DEFINE</span>
    <span id="RangeStmt.X">X</span>          <a href="#Expr">Expr</a>        <span class="com">// value to range over</span>
    <span id="RangeStmt.Body">Body</span>       *<a href="#BlockStmt">BlockStmt</a>
}</pre></div><p>
A RangeStmt represents a for statement with a range clause.
</p>

          
          
          
  


          

          
            <h4 id="RangeStmt.End" data-kind="m">func (*RangeStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L787">End</a> <a class="permalink" href="#RangeStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=RangeStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L787">❖</a><pre>func (s *<a href="#RangeStmt">RangeStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="RangeStmt.Pos" data-kind="m">func (*RangeStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L733">Pos</a> <a class="permalink" href="#RangeStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=RangeStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L733">❖</a><pre>func (s *<a href="#RangeStmt">RangeStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="ReturnStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L623">ReturnStmt</a> <a class="permalink" href="#ReturnStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ReturnStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L623">❖</a><pre>type ReturnStmt struct {
    <span id="ReturnStmt.Return">Return</span>  <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;return&#34; keyword</span>
    <span id="ReturnStmt.Results">Results</span> []<a href="#Expr">Expr</a>    <span class="com">// result expressions; or nil</span>
}</pre></div><p>
A ReturnStmt node represents a return statement.
</p>

          
          
          
  


          

          
            <h4 id="ReturnStmt.End" data-kind="m">func (*ReturnStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L752">End</a> <a class="permalink" href="#ReturnStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ReturnStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L752">❖</a><pre>func (s *<a href="#ReturnStmt">ReturnStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ReturnStmt.Pos" data-kind="m">func (*ReturnStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L723">Pos</a> <a class="permalink" href="#ReturnStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ReturnStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L723">❖</a><pre>func (s *<a href="#ReturnStmt">ReturnStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Scope" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L19">Scope</a> <a class="permalink" href="#Scope">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Scope&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L19">❖</a><pre>type Scope struct {
    <span id="Scope.Outer">Outer</span>   *<a href="#Scope">Scope</a>
    <span id="Scope.Objects">Objects</span> map[<a href="/builtin#string">string</a>]*<a href="#Object">Object</a>
}</pre></div><p>
A Scope maintains the set of named language entities declared
in the scope and a link to the immediately surrounding (outer)
scope.
</p>

          
          
          
  


          
            <h4 id="NewScope" data-kind="f">func <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L25">NewScope</a> <a class="permalink" href="#NewScope">&para;</a> <a class="uses" title="List Function Callers" href="https://sourcegraph.com/-/godoc/refs?def=NewScope&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L25">❖</a><pre>func NewScope(outer *<a href="#Scope">Scope</a>) *<a href="#Scope">Scope</a></pre></div><p>
NewScope creates a new scope nested in the outer scope.
</p>

            
  

          

          
            <h4 id="Scope.Insert" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L43">Insert</a> <a class="permalink" href="#Scope.Insert">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FInsert&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L43">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Insert(obj *<a href="#Object">Object</a>) (alt *<a href="#Object">Object</a>)</pre></div><p>
Insert attempts to insert a named object obj into the scope s.
If the scope already contains an object alt with the same name,
Insert leaves the scope unchanged and returns alt. Otherwise
it inserts obj and returns nil.
</p>

            
  

          
            <h4 id="Scope.Lookup" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L34">Lookup</a> <a class="permalink" href="#Scope.Lookup">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FLookup&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L34">❖</a><pre>func (s *<a href="#Scope">Scope</a>) Lookup(name <a href="/builtin#string">string</a>) *<a href="#Object">Object</a></pre></div><p>
Lookup returns the object with the given name if it is
found in scope s, otherwise it returns nil. Outer scopes
are ignored.
</p>

            
  

          
            <h4 id="Scope.String" data-kind="m">func (*Scope) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L51">String</a> <a class="permalink" href="#Scope.String">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=Scope%2FString&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/scope.go#L51">❖</a><pre>func (s *<a href="#Scope">Scope</a>) String() <a href="/builtin#string">string</a></pre></div><p>
Debugging support
</p>

            
  

          
        
          <h3 id="SelectStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L686">SelectStmt</a> <a class="permalink" href="#SelectStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=SelectStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L686">❖</a><pre>type SelectStmt struct {
    <span id="SelectStmt.Select">Select</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>  <span class="com">// position of &#34;select&#34; keyword</span>
    <span id="SelectStmt.Body">Body</span>   *<a href="#BlockStmt">BlockStmt</a> <span class="com">// CommClauses only</span>
}</pre></div><p>
An SelectStmt node represents a select statement.
</p>

          
          
          
  


          

          
            <h4 id="SelectStmt.End" data-kind="m">func (*SelectStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L785">End</a> <a class="permalink" href="#SelectStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SelectStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L785">❖</a><pre>func (s *<a href="#SelectStmt">SelectStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="SelectStmt.Pos" data-kind="m">func (*SelectStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L731">Pos</a> <a class="permalink" href="#SelectStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SelectStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L731">❖</a><pre>func (s *<a href="#SelectStmt">SelectStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="SelectorExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L281">SelectorExpr</a> <a class="permalink" href="#SelectorExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=SelectorExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L281">❖</a><pre>type SelectorExpr struct {
    <span id="SelectorExpr.X">X</span>   <a href="#Expr">Expr</a>   <span class="com">// expression</span>
    <span id="SelectorExpr.Sel">Sel</span> *<a href="#Ident">Ident</a> <span class="com">// field selector</span>
}</pre></div><p>
A SelectorExpr node represents an expression followed by a selector.
</p>

          
          
          
  


          

          
            <h4 id="SelectorExpr.End" data-kind="m">func (*SelectorExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L467">End</a> <a class="permalink" href="#SelectorExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SelectorExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L467">❖</a><pre>func (x *<a href="#SelectorExpr">SelectorExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="SelectorExpr.Pos" data-kind="m">func (*SelectorExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L434">Pos</a> <a class="permalink" href="#SelectorExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SelectorExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L434">❖</a><pre>func (x *<a href="#SelectorExpr">SelectorExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="SendStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L587">SendStmt</a> <a class="permalink" href="#SendStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=SendStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L587">❖</a><pre>type SendStmt struct {
    <span id="SendStmt.Chan">Chan</span>  <a href="#Expr">Expr</a>
    <span id="SendStmt.Arrow">Arrow</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;&lt;-&#34;</span>
    <span id="SendStmt.Value">Value</span> <a href="#Expr">Expr</a>
}</pre></div><p>
A SendStmt node represents a send statement.
</p>

          
          
          
  


          

          
            <h4 id="SendStmt.End" data-kind="m">func (*SendStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L745">End</a> <a class="permalink" href="#SendStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SendStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L745">❖</a><pre>func (s *<a href="#SendStmt">SendStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="SendStmt.Pos" data-kind="m">func (*SendStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L718">Pos</a> <a class="permalink" href="#SendStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SendStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L718">❖</a><pre>func (s *<a href="#SendStmt">SendStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="SliceExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L295">SliceExpr</a> <a class="permalink" href="#SliceExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=SliceExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L295">❖</a><pre>type SliceExpr struct {
    <span id="SliceExpr.X">X</span>      <a href="#Expr">Expr</a>      <span class="com">// expression</span>
    <span id="SliceExpr.Lbrack">Lbrack</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;[&#34;</span>
    <span id="SliceExpr.Low">Low</span>    <a href="#Expr">Expr</a>      <span class="com">// begin of slice range; or nil</span>
    <span id="SliceExpr.High">High</span>   <a href="#Expr">Expr</a>      <span class="com">// end of slice range; or nil</span>
    <span id="SliceExpr.Max">Max</span>    <a href="#Expr">Expr</a>      <span class="com">// maximum capacity of slice; or nil</span>
    <span id="SliceExpr.Slice3">Slice3</span> <a href="/builtin#bool">bool</a>      <span class="com">// true if 3-index slice (2 colons present)</span>
    <span id="SliceExpr.Rbrack">Rbrack</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;]&#34;</span>
}</pre></div><p>
An SliceExpr node represents an expression followed by slice indices.
</p>

          
          
          
  


          

          
            <h4 id="SliceExpr.End" data-kind="m">func (*SliceExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L469">End</a> <a class="permalink" href="#SliceExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SliceExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L469">❖</a><pre>func (x *<a href="#SliceExpr">SliceExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="SliceExpr.Pos" data-kind="m">func (*SliceExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L436">Pos</a> <a class="permalink" href="#SliceExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SliceExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L436">❖</a><pre>func (x *<a href="#SliceExpr">SliceExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Spec" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L822">Spec</a> <a class="permalink" href="#Spec">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Spec&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L822">❖</a><pre>type Spec interface {
    <a href="#Node">Node</a>
    <span class="com">// contains filtered or unexported methods</span>
}</pre></div><p>
The Spec type stands for any of *ImportSpec, *ValueSpec, and *TypeSpec.
</p>

          
          
          
  


          

          
        
          <h3 id="StarExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L327">StarExpr</a> <a class="permalink" href="#StarExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=StarExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L327">❖</a><pre>type StarExpr struct {
    <span id="StarExpr.Star">Star</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;*&#34;</span>
    <span id="StarExpr.X">X</span>    <a href="#Expr">Expr</a>      <span class="com">// operand</span>
}</pre></div><p>
A StarExpr node represents an expression of the form &#34;*&#34; Expression.
Semantically it could be a unary &#34;*&#34; expression, or a pointer type.
</p>

          
          
          
  


          

          
            <h4 id="StarExpr.End" data-kind="m">func (*StarExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L472">End</a> <a class="permalink" href="#StarExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StarExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L472">❖</a><pre>func (x *<a href="#StarExpr">StarExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="StarExpr.Pos" data-kind="m">func (*StarExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L439">Pos</a> <a class="permalink" href="#StarExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StarExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L439">❖</a><pre>func (x *<a href="#StarExpr">StarExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Stmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L47">Stmt</a> <a class="permalink" href="#Stmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Stmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L47">❖</a><pre>type Stmt interface {
    <a href="#Node">Node</a>
    <span class="com">// contains filtered or unexported methods</span>
}</pre></div><p>
All statement nodes implement the Stmt interface.
</p>

          
          
          
  


          

          
        
          <h3 id="StructType" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L382">StructType</a> <a class="permalink" href="#StructType">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=StructType&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L382">❖</a><pre>type StructType struct {
    <span id="StructType.Struct">Struct</span>     <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>  <span class="com">// position of &#34;struct&#34; keyword</span>
    <span id="StructType.Fields">Fields</span>     *<a href="#FieldList">FieldList</a> <span class="com">// list of field declarations</span>
    <span id="StructType.Incomplete">Incomplete</span> <a href="/builtin#bool">bool</a>       <span class="com">// true if (source) fields are missing in the Fields list</span>
}</pre></div><p>
A StructType node represents a struct type.
</p>

          
          
          
  


          

          
            <h4 id="StructType.End" data-kind="m">func (*StructType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L477">End</a> <a class="permalink" href="#StructType.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StructType%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L477">❖</a><pre>func (x *<a href="#StructType">StructType</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="StructType.Pos" data-kind="m">func (*StructType) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L444">Pos</a> <a class="permalink" href="#StructType.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=StructType%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L444">❖</a><pre>func (x *<a href="#StructType">StructType</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="SwitchStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L662">SwitchStmt</a> <a class="permalink" href="#SwitchStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=SwitchStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L662">❖</a><pre>type SwitchStmt struct {
    <span id="SwitchStmt.Switch">Switch</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>  <span class="com">// position of &#34;switch&#34; keyword</span>
    <span id="SwitchStmt.Init">Init</span>   <a href="#Stmt">Stmt</a>       <span class="com">// initialization statement; or nil</span>
    <span id="SwitchStmt.Tag">Tag</span>    <a href="#Expr">Expr</a>       <span class="com">// tag expression; or nil</span>
    <span id="SwitchStmt.Body">Body</span>   *<a href="#BlockStmt">BlockStmt</a> <span class="com">// CaseClauses only</span>
}</pre></div><p>
A SwitchStmt node represents an expression switch statement.
</p>

          
          
          
  


          

          
            <h4 id="SwitchStmt.End" data-kind="m">func (*SwitchStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L777">End</a> <a class="permalink" href="#SwitchStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SwitchStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L777">❖</a><pre>func (s *<a href="#SwitchStmt">SwitchStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="SwitchStmt.Pos" data-kind="m">func (*SwitchStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L728">Pos</a> <a class="permalink" href="#SwitchStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=SwitchStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L728">❖</a><pre>func (s *<a href="#SwitchStmt">SwitchStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="TypeAssertExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L308">TypeAssertExpr</a> <a class="permalink" href="#TypeAssertExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=TypeAssertExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L308">❖</a><pre>type TypeAssertExpr struct {
    <span id="TypeAssertExpr.X">X</span>      <a href="#Expr">Expr</a>      <span class="com">// expression</span>
    <span id="TypeAssertExpr.Lparen">Lparen</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;(&#34;</span>
    <span id="TypeAssertExpr.Type">Type</span>   <a href="#Expr">Expr</a>      <span class="com">// asserted type; nil means type switch X.(type)</span>
    <span id="TypeAssertExpr.Rparen">Rparen</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a> <span class="com">// position of &#34;)&#34;</span>
}</pre></div><p>
A TypeAssertExpr node represents an expression followed by a
type assertion.
</p>

          
          
          
  


          

          
            <h4 id="TypeAssertExpr.End" data-kind="m">func (*TypeAssertExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L470">End</a> <a class="permalink" href="#TypeAssertExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAssertExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L470">❖</a><pre>func (x *<a href="#TypeAssertExpr">TypeAssertExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="TypeAssertExpr.Pos" data-kind="m">func (*TypeAssertExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L437">Pos</a> <a class="permalink" href="#TypeAssertExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeAssertExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L437">❖</a><pre>func (x *<a href="#TypeAssertExpr">TypeAssertExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="TypeSpec" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L848">TypeSpec</a> <a class="permalink" href="#TypeSpec">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=TypeSpec&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L848">❖</a><pre>type TypeSpec struct {
    <span id="TypeSpec.Doc">Doc</span>     *<a href="#CommentGroup">CommentGroup</a> <span class="com">// associated documentation; or nil</span>
    <span id="TypeSpec.Name">Name</span>    *<a href="#Ident">Ident</a>        <span class="com">// type name</span>
    <span id="TypeSpec.Type">Type</span>    <a href="#Expr">Expr</a>          <span class="com">// *Ident, *ParenExpr, *SelectorExpr, *StarExpr, or any of the *XxxTypes</span>
    <span id="TypeSpec.Comment">Comment</span> *<a href="#CommentGroup">CommentGroup</a> <span class="com">// line comments; or nil</span>
}</pre></div><p>
A TypeSpec node represents a type declaration (TypeSpec production).
</p>

          
          
          
  


          

          
            <h4 id="TypeSpec.End" data-kind="m">func (*TypeSpec) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L883">End</a> <a class="permalink" href="#TypeSpec.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeSpec%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L883">❖</a><pre>func (s *<a href="#TypeSpec">TypeSpec</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="TypeSpec.Pos" data-kind="m">func (*TypeSpec) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L865">Pos</a> <a class="permalink" href="#TypeSpec.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeSpec%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L865">❖</a><pre>func (s *<a href="#TypeSpec">TypeSpec</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="TypeSwitchStmt" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L670">TypeSwitchStmt</a> <a class="permalink" href="#TypeSwitchStmt">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=TypeSwitchStmt&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L670">❖</a><pre>type TypeSwitchStmt struct {
    <span id="TypeSwitchStmt.Switch">Switch</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>  <span class="com">// position of &#34;switch&#34; keyword</span>
    <span id="TypeSwitchStmt.Init">Init</span>   <a href="#Stmt">Stmt</a>       <span class="com">// initialization statement; or nil</span>
    <span id="TypeSwitchStmt.Assign">Assign</span> <a href="#Stmt">Stmt</a>       <span class="com">// x := y.(type) or y.(type)</span>
    <span id="TypeSwitchStmt.Body">Body</span>   *<a href="#BlockStmt">BlockStmt</a> <span class="com">// CaseClauses only</span>
}</pre></div><p>
An TypeSwitchStmt node represents a type switch statement.
</p>

          
          
          
  


          

          
            <h4 id="TypeSwitchStmt.End" data-kind="m">func (*TypeSwitchStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L778">End</a> <a class="permalink" href="#TypeSwitchStmt.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeSwitchStmt%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L778">❖</a><pre>func (s *<a href="#TypeSwitchStmt">TypeSwitchStmt</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="TypeSwitchStmt.Pos" data-kind="m">func (*TypeSwitchStmt) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L729">Pos</a> <a class="permalink" href="#TypeSwitchStmt.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=TypeSwitchStmt%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L729">❖</a><pre>func (s *<a href="#TypeSwitchStmt">TypeSwitchStmt</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="UnaryExpr" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L335">UnaryExpr</a> <a class="permalink" href="#UnaryExpr">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=UnaryExpr&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L335">❖</a><pre>type UnaryExpr struct {
    <span id="UnaryExpr.OpPos">OpPos</span> <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a>   <span class="com">// position of Op</span>
    <span id="UnaryExpr.Op">Op</span>    <a href="/go/token">token</a>.<a href="/go/token#Token">Token</a> <span class="com">// operator</span>
    <span id="UnaryExpr.X">X</span>     <a href="#Expr">Expr</a>        <span class="com">// operand</span>
}</pre></div><p>
A UnaryExpr node represents a unary expression.
Unary &#34;*&#34; expressions are represented via StarExpr nodes.
</p>

          
          
          
  


          

          
            <h4 id="UnaryExpr.End" data-kind="m">func (*UnaryExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L473">End</a> <a class="permalink" href="#UnaryExpr.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=UnaryExpr%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L473">❖</a><pre>func (x *<a href="#UnaryExpr">UnaryExpr</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="UnaryExpr.Pos" data-kind="m">func (*UnaryExpr) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L440">Pos</a> <a class="permalink" href="#UnaryExpr.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=UnaryExpr%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L440">❖</a><pre>func (x *<a href="#UnaryExpr">UnaryExpr</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="ValueSpec" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L839">ValueSpec</a> <a class="permalink" href="#ValueSpec">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=ValueSpec&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="d"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L839">❖</a><pre>type ValueSpec struct {
    <span id="ValueSpec.Doc">Doc</span>     *<a href="#CommentGroup">CommentGroup</a> <span class="com">// associated documentation; or nil</span>
    <span id="ValueSpec.Names">Names</span>   []*<a href="#Ident">Ident</a>      <span class="com">// value names (len(Names) &gt; 0)</span>
    <span id="ValueSpec.Type">Type</span>    <a href="#Expr">Expr</a>          <span class="com">// value type; or nil</span>
    <span id="ValueSpec.Values">Values</span>  []<a href="#Expr">Expr</a>        <span class="com">// initial values; or nil</span>
    <span id="ValueSpec.Comment">Comment</span> *<a href="#CommentGroup">CommentGroup</a> <span class="com">// line comments; or nil</span>
}</pre></div><p>
A ValueSpec node represents a constant or variable declaration
(ConstSpec or VarSpec production).
</p>

          
          
          
  


          

          
            <h4 id="ValueSpec.End" data-kind="m">func (*ValueSpec) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L874">End</a> <a class="permalink" href="#ValueSpec.End">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ValueSpec%2FEnd&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L874">❖</a><pre>func (s *<a href="#ValueSpec">ValueSpec</a>) End() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
            <h4 id="ValueSpec.Pos" data-kind="m">func (*ValueSpec) <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L864">Pos</a> <a class="permalink" href="#ValueSpec.Pos">&para;</a> <a class="uses" title="List Method Callers" href="https://sourcegraph.com/-/godoc/refs?def=ValueSpec%2FPos&amp;pkg=go%2Fast&amp;repo=">Uses</a></h4>
            <div class="funcdecl decl"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/ast.go#L864">❖</a><pre>func (s *<a href="#ValueSpec">ValueSpec</a>) Pos() <a href="/go/token">token</a>.<a href="/go/token#Pos">Pos</a></pre></div>
            
  

          
        
          <h3 id="Visitor" data-kind="t">type <a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/walk.go#L12">Visitor</a> <a class="permalink" href="#Visitor">&para;</a> <a class="uses" title="List Uses of This Type" href="https://sourcegraph.com/-/godoc/refs?def=Visitor&amp;pkg=go%2Fast&amp;repo=">Uses</a></h3>
          <div class="decl" data-kind="m"><a title="View Source" href="https://github.com/golang/go/blob/master/src/go/ast/walk.go#L12">❖</a><pre>type Visitor interface {
    <span id="Visitor.Visit">Visit</span>(node <a href="#Node">Node</a>) (w <a href="#Visitor">Visitor</a>)
}</pre></div><p>
A Visitor&#39;s Visit method is invoked for each node encountered by Walk.
If the result visitor w is not nil, Walk visits each of the children
of node with the visitor w, followed by a call of w.Visit(nil).
</p>

<div id="x-footer" class="clearfix">
  <div class="container">
    <a href="http://studygolang.com/" target="_blank">Go语言中文网</a>
    <span class="text-muted">|</span> <a href="http://golang.org/" target="_blank">Go Language</a>
    <span class="pull-right"><a href="#">Back to top</a></span>
  </div>
</div>
<script src="../assets/jquery-2.0.3.min.js"></script>
<script src="../assets/bootstrap.min.js"></script>
<script src="../assets/site.js"></script>
</body>
</html>
